diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-02-28 22:43:53 +0000 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-06-05 21:09:26 +0100 |
| commit | 35585c499f1466037b3788598756e1eb0009f51f (patch) | |
| tree | 564b45c1826f5f8746b7ce8a657d1642b682beb5 /src/libstd | |
| parent | 47f4975cd751a03c941431b35cd7a6cba6201730 (diff) | |
Aggregation of drive-by cosmetic changes.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/panicking.rs | 5 | ||||
| -rw-r--r-- | src/libstd/sys_common/backtrace.rs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index 27b8a110ca7..9ef42063f94 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -171,7 +171,8 @@ fn default_hook(info: &PanicInfo<'_>) { } }; - let location = info.location().unwrap(); // The current implementation always returns Some + // The current implementation always returns `Some`. + let location = info.location().unwrap(); let msg = match info.payload().downcast_ref::<&'static str>() { Some(s) => *s, @@ -196,7 +197,7 @@ fn default_hook(info: &PanicInfo<'_>) { if let Some(format) = log_backtrace { let _ = backtrace::print(err, format); } else if FIRST_PANIC.compare_and_swap(true, false, Ordering::SeqCst) { - let _ = writeln!(err, "note: Run with `RUST_BACKTRACE=1` \ + let _ = writeln!(err, "note: run with `RUST_BACKTRACE=1` \ environment variable to display a backtrace."); } } diff --git a/src/libstd/sys_common/backtrace.rs b/src/libstd/sys_common/backtrace.rs index a01b31e948b..bf37ff7ddbd 100644 --- a/src/libstd/sys_common/backtrace.rs +++ b/src/libstd/sys_common/backtrace.rs @@ -173,7 +173,7 @@ impl<'a, 'b> Printer<'a, 'b> { Some(symbol) => { match self.format { PrintFormat::Full => write!(self.out, "{}", symbol)?, - // strip the trailing hash if short mode + // Strip the trailing hash if short mode. PrintFormat::Short => write!(self.out, "{:#}", symbol)?, } } |
