about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-28 07:01:52 +0000
committerbors <bors@rust-lang.org>2023-08-28 07:01:52 +0000
commit7e02fd825198e9a958bac085506890a895498aa0 (patch)
treeca964e93cf01a6027d69bcb536b0d0ffd88d1b8d /src/tools
parent41cb42a370b35707a75c79ff9ab6af1191b638fb (diff)
parent32053f760280c6d0ed8b4394947e39e3732702c3 (diff)
downloadrust-7e02fd825198e9a958bac085506890a895498aa0.tar.gz
rust-7e02fd825198e9a958bac085506890a895498aa0.zip
Auto merge of #115303 - matthiaskrgr:rollup-iohs8a5, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #109660 (Document that SystemTime does not count leap seconds)
 - #114238 (Fix implementation of `Duration::checked_div`)
 - #114512 (std/tests: disable ancillary tests on freebsd since the feature itsel…)
 - #114919 (style-guide: Add guidance for defining formatting for specific macros)
 - #115278 (tell people what to do when removing an error code)
 - #115280 (avoid triple-backtrace due to panic-during-cleanup)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/miri/tests/fail/panic/double_panic.stderr3
-rw-r--r--src/tools/tidy/src/error_codes.rs7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/tools/miri/tests/fail/panic/double_panic.stderr b/src/tools/miri/tests/fail/panic/double_panic.stderr
index 9efba031250..a39522c8a61 100644
--- a/src/tools/miri/tests/fail/panic/double_panic.stderr
+++ b/src/tools/miri/tests/fail/panic/double_panic.stderr
@@ -6,7 +6,6 @@ second
 stack backtrace:
 thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
 panic in a destructor during cleanup
-stack backtrace:
 thread caused non-unwinding panic. aborting.
 error: abnormal termination: the program aborted execution
   --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
@@ -19,7 +18,7 @@ LL |     ABORT();
    = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
    = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
    = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
-   = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC
+   = note: inside `core::panicking::panic_nounwind_nobacktrace` at RUSTLIB/core/src/panicking.rs:LL:CC
    = note: inside `core::panicking::panic_in_cleanup` at RUSTLIB/core/src/panicking.rs:LL:CC
 note: inside `main`
   --> $DIR/double_panic.rs:LL:CC
diff --git a/src/tools/tidy/src/error_codes.rs b/src/tools/tidy/src/error_codes.rs
index 417ace58c32..3e67bac499b 100644
--- a/src/tools/tidy/src/error_codes.rs
+++ b/src/tools/tidy/src/error_codes.rs
@@ -354,7 +354,12 @@ fn check_error_codes_used(
 
     for code in error_codes {
         if !found_codes.contains(code) && !no_longer_emitted.contains(code) {
-            errors.push(format!("Error code `{code}` exists, but is not emitted by the compiler!"))
+            errors.push(format!(
+                "Error code `{code}` exists, but is not emitted by the compiler!\n\
+                Please mark the code as no longer emitted by adding the following note to the top of the `EXXXX.md` file:\n\
+                `#### Note: this error code is no longer emitted by the compiler`\n\
+                Also, do not forget to mark doctests that no longer apply as `ignore (error is no longer emitted)`."
+            ));
         }
 
         if found_codes.contains(code) && no_longer_emitted.contains(code) {