diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2024-03-15 19:09:24 +0100 |
|---|---|---|
| committer | The 8472 <git@infinite-source.de> | 2025-01-01 15:58:29 +0100 |
| commit | 4bf85c25eceee6172ed3892570f36b5d06d5177f (patch) | |
| tree | 0286f505fd0185e26a2869dbaccc5d9348d3a01e /tests | |
| parent | eeeff9a66cda13934600800eee40fd84ba1647eb (diff) | |
| download | rust-4bf85c25eceee6172ed3892570f36b5d06d5177f.tar.gz rust-4bf85c25eceee6172ed3892570f36b5d06d5177f.zip | |
Try to write the panic message with a single `write_all` call
Diffstat (limited to 'tests')
48 files changed, 78 insertions, 19 deletions
diff --git a/tests/run-make/libtest-json/output-default.json b/tests/run-make/libtest-json/output-default.json index a2293a032d0..a6a8a9f3b47 100644 --- a/tests/run-make/libtest-json/output-default.json +++ b/tests/run-make/libtest-json/output-default.json @@ -2,7 +2,7 @@ { "type": "test", "event": "started", "name": "a" } { "type": "test", "name": "a", "event": "ok" } { "type": "test", "event": "started", "name": "b" } -{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" } +{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" } { "type": "test", "event": "started", "name": "c" } { "type": "test", "name": "c", "event": "ok" } { "type": "test", "event": "started", "name": "d" } diff --git a/tests/run-make/libtest-json/output-stdout-success.json b/tests/run-make/libtest-json/output-stdout-success.json index cf92f01f63a..a6c36e746b3 100644 --- a/tests/run-make/libtest-json/output-stdout-success.json +++ b/tests/run-make/libtest-json/output-stdout-success.json @@ -2,9 +2,9 @@ { "type": "test", "event": "started", "name": "a" } { "type": "test", "name": "a", "event": "ok", "stdout": "print from successful test\n" } { "type": "test", "event": "started", "name": "b" } -{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" } +{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" } { "type": "test", "event": "started", "name": "c" } -{ "type": "test", "name": "c", "event": "ok", "stdout": "thread 'c' panicked at f.rs:15:5:\nassertion failed: false\n" } +{ "type": "test", "name": "c", "event": "ok", "stdout": "\nthread 'c' panicked at f.rs:15:5:\nassertion failed: false\n" } { "type": "test", "event": "started", "name": "d" } { "type": "test", "name": "d", "event": "ignored", "message": "msg" } { "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": "$EXEC_TIME" } diff --git a/tests/run-make/libtest-junit/output-default.xml b/tests/run-make/libtest-junit/output-default.xml index 58a9a28744f..aa1b8c855aa 100644 --- a/tests/run-make/libtest-junit/output-default.xml +++ b/tests/run-make/libtest-junit/output-default.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"/><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>
<![CDATA[thread 'b' panicked at f.rs:10:5:]]>
<![CDATA[assertion failed: false]]>
<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>
<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"/><system-out/><system-err/></testsuite></testsuites> +<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"/><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>

<![CDATA[thread 'b' panicked at f.rs:10:5:]]>
<![CDATA[assertion failed: false]]>
<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>
<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"/><system-out/><system-err/></testsuite></testsuites> diff --git a/tests/run-make/libtest-junit/output-stdout-success.xml b/tests/run-make/libtest-junit/output-stdout-success.xml index 723816a4acd..2592ec7efb1 100644 --- a/tests/run-make/libtest-junit/output-stdout-success.xml +++ b/tests/run-make/libtest-junit/output-stdout-success.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"><system-out><![CDATA[print from successful test]]>
<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>
<![CDATA[thread 'b' panicked at f.rs:10:5:]]>
<![CDATA[assertion failed: false]]>
<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>
<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"><system-out><![CDATA[thread 'c' panicked at f.rs:16:5:]]>
<![CDATA[assertion failed: false]]>
<![CDATA[]]></system-out></testcase><system-out/><system-err/></testsuite></testsuites> +<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"><system-out><![CDATA[print from successful test]]>
<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>

<![CDATA[thread 'b' panicked at f.rs:10:5:]]>
<![CDATA[assertion failed: false]]>
<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>
<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"><system-out><![CDATA[]]>
<![CDATA[thread 'c' panicked at f.rs:16:5:]]>
<![CDATA[assertion failed: false]]>
<![CDATA[]]></system-out></testcase><system-out/><system-err/></testsuite></testsuites> diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout index 1b37249dd60..7aa965d543b 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout +++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout @@ -26,6 +26,7 @@ stdout 2 stderr: stderr 1 stderr 2 + thread 'main' panicked at $DIR/failed-doctest-output-windows.rs:7:1: oh no note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout index 7b0cf9a432d..a333f341ce5 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout +++ b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout @@ -26,6 +26,7 @@ stdout 2 stderr: stderr 1 stderr 2 + thread 'main' panicked at $DIR/failed-doctest-output.rs:7:1: oh no note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/rustdoc-ui/ice-bug-report-url.stderr b/tests/rustdoc-ui/ice-bug-report-url.stderr index 66622a7654c..14a961c2ce0 100644 --- a/tests/rustdoc-ui/ice-bug-report-url.stderr +++ b/tests/rustdoc-ui/ice-bug-report-url.stderr @@ -5,6 +5,7 @@ LL | fn wrong() | ^ expected one of `->`, `where`, or `{` + aborting due to `-Z treat-err-as-bug=1` stack backtrace: diff --git a/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout index 2102e2c3891..87d1e772b80 100644 --- a/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout +++ b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout @@ -8,6 +8,7 @@ failures: Test executable failed (exit status: 101). stderr: + thread 'main' panicked at remapped_path/remap-path-prefix-failed-doctest-output.rs:3:1: oh no note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/backtrace/synchronized-panic-handler.run.stderr b/tests/ui/backtrace/synchronized-panic-handler.run.stderr index 8a06d00ea59..7a60ef2da60 100644 --- a/tests/ui/backtrace/synchronized-panic-handler.run.stderr +++ b/tests/ui/backtrace/synchronized-panic-handler.run.stderr @@ -1,5 +1,7 @@ + thread '<unnamed>' panicked at $DIR/synchronized-panic-handler.rs:11:5: oops oh no woe is me note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + thread '<unnamed>' panicked at $DIR/synchronized-panic-handler.rs:11:5: oops oh no woe is me diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr index 01529599d37..c851a8380f2 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr @@ -1,6 +1,7 @@ error: internal compiler error: compiler/rustc_const_eval/src/interpret/operator.rs:LL:CC: unsized type for `NullaryOp::SizeOf` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL + Box<dyn Any> query stack during panic: #0 [eval_to_allocation_raw] const-evaluating + checking `<impl at $DIR/issue-80742.rs:26:1: 28:32>::{constant#0}` diff --git a/tests/ui/consts/const-eval/const-eval-query-stack.stderr b/tests/ui/consts/const-eval/const-eval-query-stack.stderr index 0a28c5b80bf..5a71c770fdc 100644 --- a/tests/ui/consts/const-eval/const-eval-query-stack.stderr +++ b/tests/ui/consts/const-eval/const-eval-query-stack.stderr @@ -4,6 +4,7 @@ error: internal compiler error[E0080]: evaluation of constant value failed LL | const X: i32 = 1 / 0; | ^^^^^ attempt to divide `1_i32` by zero + note: please make sure that you have updated to the latest nightly query stack during panic: diff --git a/tests/ui/extern/extern-types-field-offset.run.stderr b/tests/ui/extern/extern-types-field-offset.run.stderr index 1b04b860db5..07bd4fcb13f 100644 --- a/tests/ui/extern/extern-types-field-offset.run.stderr +++ b/tests/ui/extern/extern-types-field-offset.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL: attempted to compute the size or alignment of extern type `Opaque` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/extern/extern-types-size_of_val.align.run.stderr b/tests/ui/extern/extern-types-size_of_val.align.run.stderr index 20c4d8785e8..5ba372d60fa 100644 --- a/tests/ui/extern/extern-types-size_of_val.align.run.stderr +++ b/tests/ui/extern/extern-types-size_of_val.align.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL: attempted to compute the size or alignment of extern type `A` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/extern/extern-types-size_of_val.size.run.stderr b/tests/ui/extern/extern-types-size_of_val.size.run.stderr index 20c4d8785e8..5ba372d60fa 100644 --- a/tests/ui/extern/extern-types-size_of_val.size.run.stderr +++ b/tests/ui/extern/extern-types-size_of_val.size.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL: attempted to compute the size or alignment of extern type `A` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/hygiene/panic-location.run.stderr b/tests/ui/hygiene/panic-location.run.stderr index b9086ecef81..5cd07dcda4c 100644 --- a/tests/ui/hygiene/panic-location.run.stderr +++ b/tests/ui/hygiene/panic-location.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/panic-location.rs:LL:CC: capacity overflow note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr b/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr index a0024c0920f..71d792b7f77 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr +++ b/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/const-eval-select-backtrace-std.rs:6:8: byte index 1 is out of bounds of `` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr b/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr index 8f38d54146b..4f11f5966ed 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr +++ b/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/const-eval-select-backtrace.rs:15:5: Aaah! note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/intrinsics/not-overridden.stderr b/tests/ui/intrinsics/not-overridden.stderr index 9b8849cea1c..b5273a4fa47 100644 --- a/tests/ui/intrinsics/not-overridden.stderr +++ b/tests/ui/intrinsics/not-overridden.stderr @@ -4,6 +4,7 @@ error: must be overridden by codegen backend, but isn't LL | unsafe { const_deallocate(std::ptr::null_mut(), 0, 0) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + query stack during panic: end of query stack error: aborting due to 1 previous error diff --git a/tests/ui/issues/issue-87707.run.stderr b/tests/ui/issues/issue-87707.run.stderr index 255a77a6ab1..eb1d65a081f 100644 --- a/tests/ui/issues/issue-87707.run.stderr +++ b/tests/ui/issues/issue-87707.run.stderr @@ -1,5 +1,7 @@ + thread 'main' panicked at $DIR/issue-87707.rs:14:24: Here Once instance is poisoned. note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + thread 'main' panicked at $DIR/issue-87707.rs:16:7: Once instance has previously been poisoned diff --git a/tests/ui/layout/valid_range_oob.stderr b/tests/ui/layout/valid_range_oob.stderr index d56804a35a7..9c360b2cd6e 100644 --- a/tests/ui/layout/valid_range_oob.stderr +++ b/tests/ui/layout/valid_range_oob.stderr @@ -1,3 +1,4 @@ + 257 > 255 error: the compiler unexpectedly panicked. this is a bug. diff --git a/tests/ui/macros/assert-long-condition.run.stderr b/tests/ui/macros/assert-long-condition.run.stderr index 5c0ff357cb7..c2c5fe5d7d5 100644 --- a/tests/ui/macros/assert-long-condition.run.stderr +++ b/tests/ui/macros/assert-long-condition.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/assert-long-condition.rs:7:5: assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0 diff --git a/tests/ui/mir/lint/storage-live.stderr b/tests/ui/mir/lint/storage-live.stderr index 7d4c3f0832a..c7012319512 100644 --- a/tests/ui/mir/lint/storage-live.stderr +++ b/tests/ui/mir/lint/storage-live.stderr @@ -11,6 +11,7 @@ note: delayed at compiler/rustc_mir_transform/src/lint.rs:LL:CC - disabled backt LL | StorageLive(a); | ^^^^^^^^^^^^^^ + aborting due to `-Z treat-err-as-bug=1` error: the compiler unexpectedly panicked. this is a bug. diff --git a/tests/ui/panics/default-backtrace-ice.stderr b/tests/ui/panics/default-backtrace-ice.stderr index 046b2cca7f9..2147b0971b5 100644 --- a/tests/ui/panics/default-backtrace-ice.stderr +++ b/tests/ui/panics/default-backtrace-ice.stderr @@ -5,6 +5,7 @@ LL | fn main() { missing_ident; } | ^^^^^^^^^^^^^ not found in this scope + aborting due to `-Z treat-err-as-bug=1` stack backtrace: (end_short_backtrace) diff --git a/tests/ui/panics/fmt-only-once.run.stderr b/tests/ui/panics/fmt-only-once.run.stderr index a991706d34e..faa3cc91151 100644 --- a/tests/ui/panics/fmt-only-once.run.stderr +++ b/tests/ui/panics/fmt-only-once.run.stderr @@ -1,4 +1,5 @@ fmt + thread 'main' panicked at $DIR/fmt-only-once.rs:20:5: PrintOnFmt note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/issue-47429-short-backtraces.run.stderr b/tests/ui/panics/issue-47429-short-backtraces.run.stderr index 6a22e0215fe..c6e2d13fb5d 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.run.stderr +++ b/tests/ui/panics/issue-47429-short-backtraces.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:26:5: explicit panic stack backtrace: diff --git a/tests/ui/panics/location-detail-panic-no-column.run.stderr b/tests/ui/panics/location-detail-panic-no-column.run.stderr index 6d8d02a3a55..f63c09652b8 100644 --- a/tests/ui/panics/location-detail-panic-no-column.run.stderr +++ b/tests/ui/panics/location-detail-panic-no-column.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/location-detail-panic-no-column.rs:7:0: column-redacted note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/location-detail-panic-no-file.run.stderr b/tests/ui/panics/location-detail-panic-no-file.run.stderr index 492ad37f5c7..3d1c6defa31 100644 --- a/tests/ui/panics/location-detail-panic-no-file.run.stderr +++ b/tests/ui/panics/location-detail-panic-no-file.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at <redacted>:7:5: file-redacted note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/location-detail-panic-no-line.run.stderr b/tests/ui/panics/location-detail-panic-no-line.run.stderr index fdbc43c4311..9809ab5e2b4 100644 --- a/tests/ui/panics/location-detail-panic-no-line.run.stderr +++ b/tests/ui/panics/location-detail-panic-no-line.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/location-detail-panic-no-line.rs:0:5: line-redacted note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/location-detail-panic-no-location-info.run.stderr b/tests/ui/panics/location-detail-panic-no-location-info.run.stderr index 1e9002df955..f68a0d663c0 100644 --- a/tests/ui/panics/location-detail-panic-no-location-info.run.stderr +++ b/tests/ui/panics/location-detail-panic-no-location-info.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at <redacted>:0:0: no location info note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/location-detail-unwrap-no-file.run.stderr b/tests/ui/panics/location-detail-unwrap-no-file.run.stderr index 52019f62233..af4a4997fae 100644 --- a/tests/ui/panics/location-detail-unwrap-no-file.run.stderr +++ b/tests/ui/panics/location-detail-unwrap-no-file.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at <redacted>:8:9: called `Option::unwrap()` on a `None` value note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-in-cleanup.run.stderr b/tests/ui/panics/panic-in-cleanup.run.stderr index e7def11b0e9..34383562c36 100644 --- a/tests/ui/panics/panic-in-cleanup.run.stderr +++ b/tests/ui/panics/panic-in-cleanup.run.stderr @@ -1,9 +1,12 @@ + thread 'main' panicked at $DIR/panic-in-cleanup.rs:22:5: explicit panic note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + thread 'main' panicked at $DIR/panic-in-cleanup.rs:16:9: BOOM stack backtrace: + thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL: panic in a destructor during cleanup thread caused non-unwinding panic. aborting. diff --git a/tests/ui/panics/panic-in-ffi.run.stderr b/tests/ui/panics/panic-in-ffi.run.stderr index fe8c2b04b91..a6f3ebe5657 100644 --- a/tests/ui/panics/panic-in-ffi.run.stderr +++ b/tests/ui/panics/panic-in-ffi.run.stderr @@ -1,7 +1,9 @@ + thread 'main' panicked at $DIR/panic-in-ffi.rs:21:5: Test note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Noisy Drop + thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL: panic in a function that cannot unwind stack backtrace: diff --git a/tests/ui/panics/runtime-switch.run.stderr b/tests/ui/panics/runtime-switch.run.stderr index 35be010d6be..458a0ee534a 100644 --- a/tests/ui/panics/runtime-switch.run.stderr +++ b/tests/ui/panics/runtime-switch.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/runtime-switch.rs:29:5: explicit panic stack backtrace: diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr index ab23ce78062..1fddcca6951 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr +++ b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:63:5: debug!!! stack backtrace: diff --git a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr index d2616911e3b..630b09d8d1e 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr +++ b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:59:5: debug!!! stack backtrace: diff --git a/tests/ui/proc-macro/load-panic-backtrace.stderr b/tests/ui/proc-macro/load-panic-backtrace.stderr index 0f3db6c831e..a1049f5a324 100644 --- a/tests/ui/proc-macro/load-panic-backtrace.stderr +++ b/tests/ui/proc-macro/load-panic-backtrace.stderr @@ -1,3 +1,4 @@ + at $DIR/auxiliary/test-macros.rs:38:5: panic-derive error: proc-macro derive panicked diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs index 02b69903654..ad47925a149 100644 --- a/tests/ui/process/multi-panic.rs +++ b/tests/ui/process/multi-panic.rs @@ -6,12 +6,17 @@ fn check_for_no_backtrace(test: std::process::Output) { assert!(!test.status.success()); let err = String::from_utf8_lossy(&test.stderr); - let mut it = err.lines(); + let mut it = err.lines().filter(|l| !l.is_empty()); assert_eq!(it.next().map(|l| l.starts_with("thread '<unnamed>' panicked")), Some(true)); assert_eq!(it.next().is_some(), true); - assert_eq!(it.next(), Some("note: run with `RUST_BACKTRACE=1` \ - environment variable to display a backtrace")); + assert_eq!( + it.next(), + Some( + "note: run with `RUST_BACKTRACE=1` \ + environment variable to display a backtrace" + ) + ); assert_eq!(it.next().map(|l| l.starts_with("thread 'main' panicked at")), Some(true)); assert_eq!(it.next().is_some(), true); assert_eq!(it.next(), None); @@ -22,19 +27,22 @@ fn main() { if args.len() > 1 && args[1] == "run_test" { let _ = std::thread::spawn(|| { panic!(); - }).join(); + }) + .join(); panic!(); } else { - let test = std::process::Command::new(&args[0]).arg("run_test") - .env_remove("RUST_BACKTRACE") - .output() - .unwrap(); + let test = std::process::Command::new(&args[0]) + .arg("run_test") + .env_remove("RUST_BACKTRACE") + .output() + .unwrap(); check_for_no_backtrace(test); - let test = std::process::Command::new(&args[0]).arg("run_test") - .env("RUST_BACKTRACE","0") - .output() - .unwrap(); + let test = std::process::Command::new(&args[0]) + .arg("run_test") + .env("RUST_BACKTRACE", "0") + .output() + .unwrap(); check_for_no_backtrace(test); } } diff --git a/tests/ui/process/println-with-broken-pipe.run.stderr b/tests/ui/process/println-with-broken-pipe.run.stderr index a334c0ad204..ab414994b56 100644 --- a/tests/ui/process/println-with-broken-pipe.run.stderr +++ b/tests/ui/process/println-with-broken-pipe.run.stderr @@ -1,3 +1,4 @@ + thread 'main' panicked at library/std/src/io/stdio.rs:LL:CC: failed printing to stdout: Broken pipe (os error 32) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/resolve/multiple_definitions_attribute_merging.stderr b/tests/ui/resolve/multiple_definitions_attribute_merging.stderr index 98cad18d442..804fa079bb9 100644 --- a/tests/ui/resolve/multiple_definitions_attribute_merging.stderr +++ b/tests/ui/resolve/multiple_definitions_attribute_merging.stderr @@ -16,7 +16,8 @@ LL | #[repr(C)] LL | struct Dealigned<T>(u8, T); | ^ | - = Box<dyn Any> + = +Box<dyn Any> query stack during panic: #0 [mir_built] building MIR for `<impl at $DIR/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq` #1 [check_unsafety] unsafety-checking `<impl at $DIR/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq` diff --git a/tests/ui/resolve/proc_macro_generated_packed.stderr b/tests/ui/resolve/proc_macro_generated_packed.stderr index 4e716704610..a5a02c9c393 100644 --- a/tests/ui/resolve/proc_macro_generated_packed.stderr +++ b/tests/ui/resolve/proc_macro_generated_packed.stderr @@ -7,7 +7,8 @@ LL | #[derive(PartialEq)] LL | struct Dealigned<T>(u8, T); | ^ | - = Box<dyn Any> + = +Box<dyn Any> query stack during panic: #0 [mir_built] building MIR for `<impl at $DIR/proc_macro_generated_packed.rs:15:10: 15:19>::eq` #1 [check_unsafety] unsafety-checking `<impl at $DIR/proc_macro_generated_packed.rs:15:10: 15:19>::eq` diff --git a/tests/ui/test-attrs/terse.run.stdout b/tests/ui/test-attrs/terse.run.stdout index 2b361361ae8..ac1ac28c98d 100644 --- a/tests/ui/test-attrs/terse.run.stdout +++ b/tests/ui/test-attrs/terse.run.stdout @@ -9,15 +9,18 @@ foo2 --- FAILED failures: ---- abc stdout ---- + thread 'abc' panicked at $DIR/terse.rs:12:5: explicit panic note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- foo stdout ---- + thread 'foo' panicked at $DIR/terse.rs:17:5: explicit panic ---- foo2 stdout ---- + thread 'foo2' panicked at $DIR/terse.rs:22:5: explicit panic diff --git a/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr b/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr index 16001b3eecd..25681171170 100644 --- a/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr +++ b/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr @@ -1,8 +1,10 @@ + thread 'main' panicked at $DIR/test-panic-abort-nocapture.rs:34:5: assertion `left == right` failed left: 2 right: 4 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + thread 'main' panicked at $DIR/test-panic-abort-nocapture.rs:28:5: assertion `left == right` failed left: 2 diff --git a/tests/ui/test-attrs/test-panic-abort.run.stdout b/tests/ui/test-attrs/test-panic-abort.run.stdout index f5d14e77da9..844808e8637 100644 --- a/tests/ui/test-attrs/test-panic-abort.run.stdout +++ b/tests/ui/test-attrs/test-panic-abort.run.stdout @@ -17,6 +17,7 @@ hello, world testing123 ---- it_fails stderr ---- testing321 + thread 'main' panicked at $DIR/test-panic-abort.rs:39:5: assertion `left == right` failed left: 2 diff --git a/tests/ui/test-attrs/test-thread-capture.run.stdout b/tests/ui/test-attrs/test-thread-capture.run.stdout index 31261aaa230..f9b9757f861 100644 --- a/tests/ui/test-attrs/test-thread-capture.run.stdout +++ b/tests/ui/test-attrs/test-thread-capture.run.stdout @@ -10,6 +10,7 @@ fee fie foe fum + thread 'thready_fail' panicked at $DIR/test-thread-capture.rs:32:5: explicit panic note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/test-attrs/test-thread-nocapture.run.stderr b/tests/ui/test-attrs/test-thread-nocapture.run.stderr index 9266fe84197..59560015fca 100644 --- a/tests/ui/test-attrs/test-thread-nocapture.run.stderr +++ b/tests/ui/test-attrs/test-thread-nocapture.run.stderr @@ -1,3 +1,4 @@ + thread 'thready_fail' panicked at $DIR/test-thread-nocapture.rs:32:5: explicit panic note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/track-diagnostics/track.stderr b/tests/ui/track-diagnostics/track.stderr index 436f9ecf93d..d2908bb9177 100644 --- a/tests/ui/track-diagnostics/track.stderr +++ b/tests/ui/track-diagnostics/track.stderr @@ -24,6 +24,7 @@ LL | break rust = note: rustc $VERSION running on $TARGET = note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics + thread 'rustc' panicked at compiler/rustc_hir_typeck/src/lib.rs:LL:CC: Box<dyn Any> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/treat-err-as-bug/err.stderr b/tests/ui/treat-err-as-bug/err.stderr index eb7b50b4210..df5fed3fb8e 100644 --- a/tests/ui/treat-err-as-bug/err.stderr +++ b/tests/ui/treat-err-as-bug/err.stderr @@ -4,6 +4,7 @@ error: internal compiler error[E0080]: could not evaluate static initializer LL | pub static C: u32 = 0 - 1; | ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow + error: the compiler unexpectedly panicked. this is a bug. query stack during panic: diff --git a/tests/ui/treat-err-as-bug/span_delayed_bug.stderr b/tests/ui/treat-err-as-bug/span_delayed_bug.stderr index f0e8cd0ddb9..aec1b89c766 100644 --- a/tests/ui/treat-err-as-bug/span_delayed_bug.stderr +++ b/tests/ui/treat-err-as-bug/span_delayed_bug.stderr @@ -4,6 +4,7 @@ error: internal compiler error: delayed bug triggered by #[rustc_error(delayed_b LL | fn main() {} | ^^^^^^^^^ + error: the compiler unexpectedly panicked. this is a bug. query stack during panic: |
