Skip to content

Commit

Permalink
Join mutiple lines if it is more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 15, 2020
1 parent d4ecf31 commit 64a6de2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
9 changes: 3 additions & 6 deletions src/libcore/panic.rs
Expand Up @@ -39,8 +39,7 @@ pub struct PanicInfo<'a> {
impl<'a> PanicInfo<'a> {
#[unstable(
feature = "panic_internals",
reason = "internal details of the implementation of the `panic!` \
and related macros",
reason = "internal details of the implementation of the `panic!` and related macros",
issue = "none"
)]
#[doc(hidden)]
Expand All @@ -55,8 +54,7 @@ impl<'a> PanicInfo<'a> {

#[unstable(
feature = "panic_internals",
reason = "internal details of the implementation of the `panic!` \
and related macros",
reason = "internal details of the implementation of the `panic!` and related macros",
issue = "none"
)]
#[doc(hidden)]
Expand Down Expand Up @@ -244,8 +242,7 @@ impl<'a> Location<'a> {
impl<'a> Location<'a> {
#![unstable(
feature = "panic_internals",
reason = "internal details of the implementation of the `panic!` \
and related macros",
reason = "internal details of the implementation of the `panic!` and related macros",
issue = "none"
)]
#[doc(hidden)]
Expand Down
3 changes: 1 addition & 2 deletions src/libcore/panicking.rs
Expand Up @@ -22,8 +22,7 @@
#![allow(dead_code, missing_docs)]
#![unstable(
feature = "core_panic",
reason = "internal details of the implementation of the `panic!` \
and related macros",
reason = "internal details of the implementation of the `panic!` and related macros",
issue = "none"
)]

Expand Down
3 changes: 1 addition & 2 deletions src/librustc_middle/ty/context.rs
Expand Up @@ -189,8 +189,7 @@ fn validate_hir_id_for_typeck_tables(
if hir_id.owner != hir_owner {
ty::tls::with(|tcx| {
bug!(
"node {} with HirId::owner {:?} cannot be placed in \
TypeckTables with hir_owner {:?}",
"node {} with HirId::owner {:?} cannot be placed in TypeckTables with hir_owner {:?}",
tcx.hir().node_to_string(hir_id),
hir_id.owner,
hir_owner
Expand Down
13 changes: 3 additions & 10 deletions src/libstd/panicking.rs
Expand Up @@ -201,8 +201,7 @@ fn default_hook(info: &PanicInfo<'_>) {
if FIRST_PANIC.swap(false, Ordering::SeqCst) {
let _ = writeln!(
err,
"note: run with `RUST_BACKTRACE=1` \
environment variable to display a backtrace"
"note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace"
);
}
}
Expand Down Expand Up @@ -454,10 +453,7 @@ fn rust_panic_with_hook(
// process real quickly as we don't want to try calling it again as it'll
// probably just panic again.
if panics > 2 {
util::dumb_print(format_args!(
"thread panicked while processing \
panic. aborting.\n"
));
util::dumb_print(format_args!("thread panicked while processing panic. aborting.\n"));
intrinsics::abort()
}

Expand Down Expand Up @@ -489,10 +485,7 @@ fn rust_panic_with_hook(
// have limited options. Currently our preference is to
// just abort. In the future we may consider resuming
// unwinding or otherwise exiting the thread cleanly.
util::dumb_print(format_args!(
"thread panicked while panicking. \
aborting.\n"
));
util::dumb_print(format_args!("thread panicked while panicking. aborting.\n"));
intrinsics::abort()
}

Expand Down

0 comments on commit 64a6de2

Please sign in to comment.