diff options
Diffstat (limited to 'tests/ui/panics')
24 files changed, 50 insertions, 22 deletions
diff --git a/tests/ui/panics/abort-on-panic.rs b/tests/ui/panics/abort-on-panic.rs index 1f6ad64c0..7fbee85ff 100644 --- a/tests/ui/panics/abort-on-panic.rs +++ b/tests/ui/panics/abort-on-panic.rs @@ -1,4 +1,6 @@ // run-pass +// revisions: current next +//[next] compile-flags: -Ztrait-solver=next #![allow(unused_must_use)] #![feature(c_unwind)] diff --git a/tests/ui/panics/default-backtrace-ice.stderr b/tests/ui/panics/default-backtrace-ice.stderr index 815ce4dd0..4b00f1350 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) (begin_short_backtrace) diff --git a/tests/ui/panics/fmt-only-once.run.stderr b/tests/ui/panics/fmt-only-once.run.stderr index 39bd06881..a991706d3 100644 --- a/tests/ui/panics/fmt-only-once.run.stderr +++ b/tests/ui/panics/fmt-only-once.run.stderr @@ -1,3 +1,4 @@ fmt -thread 'main' panicked at 'PrintOnFmt', $DIR/fmt-only-once.rs:20:5 +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.legacy.run.stderr b/tests/ui/panics/issue-47429-short-backtraces.legacy.run.stderr index ac4ed8225..dce91ce59 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.legacy.run.stderr +++ b/tests/ui/panics/issue-47429-short-backtraces.legacy.run.stderr @@ -1,4 +1,5 @@ -thread 'main' panicked at 'explicit panic', $DIR/issue-47429-short-backtraces.rs:23:5 +thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:23:5: +explicit panic stack backtrace: 0: std::panicking::begin_panic 1: issue_47429_short_backtraces::main diff --git a/tests/ui/panics/issue-47429-short-backtraces.v0.run.stderr b/tests/ui/panics/issue-47429-short-backtraces.v0.run.stderr index 65401fe1c..f458c7acb 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.v0.run.stderr +++ b/tests/ui/panics/issue-47429-short-backtraces.v0.run.stderr @@ -1,4 +1,5 @@ -thread 'main' panicked at 'explicit panic', $DIR/issue-47429-short-backtraces.rs:23:5 +thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:23:5: +explicit panic stack backtrace: 0: std::panicking::begin_panic::<&str> 1: issue_47429_short_backtraces::main 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 46c9b8448..6d8d02a3a 100644 --- a/tests/ui/panics/location-detail-panic-no-column.run.stderr +++ b/tests/ui/panics/location-detail-panic-no-column.run.stderr @@ -1,2 +1,3 @@ -thread 'main' panicked at 'column-redacted', $DIR/location-detail-panic-no-column.rs:7:0 +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 811f93bf3..492ad37f5 100644 --- a/tests/ui/panics/location-detail-panic-no-file.run.stderr +++ b/tests/ui/panics/location-detail-panic-no-file.run.stderr @@ -1,2 +1,3 @@ -thread 'main' panicked at 'file-redacted', <redacted>:7:5 +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 cc3f1624c..fdbc43c43 100644 --- a/tests/ui/panics/location-detail-panic-no-line.run.stderr +++ b/tests/ui/panics/location-detail-panic-no-line.run.stderr @@ -1,2 +1,3 @@ -thread 'main' panicked at 'line-redacted', $DIR/location-detail-panic-no-line.rs:0:5 +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 d1c310864..1e9002df9 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,2 +1,3 @@ -thread 'main' panicked at 'no location info', <redacted>:0:0 +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 7d8e1d930..52019f622 100644 --- a/tests/ui/panics/location-detail-unwrap-no-file.run.stderr +++ b/tests/ui/panics/location-detail-unwrap-no-file.run.stderr @@ -1,2 +1,3 @@ -thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', <redacted>:8:9 +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-macro-any-wrapped.rs b/tests/ui/panics/panic-macro-any-wrapped.rs index 663bf6713..1815a0d2c 100644 --- a/tests/ui/panics/panic-macro-any-wrapped.rs +++ b/tests/ui/panics/panic-macro-any-wrapped.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:panicked at 'Box<dyn Any>' +// error-pattern:panicked +// error-pattern:Box<dyn Any> // ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-any.rs b/tests/ui/panics/panic-macro-any.rs index c7df53654..1bc3c336c 100644 --- a/tests/ui/panics/panic-macro-any.rs +++ b/tests/ui/panics/panic-macro-any.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:panicked at 'Box<dyn Any>' +// error-pattern:panicked +// error-pattern:Box<dyn Any> // ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-explicit.rs b/tests/ui/panics/panic-macro-explicit.rs index ac4d6f812..b5b6c7675 100644 --- a/tests/ui/panics/panic-macro-explicit.rs +++ b/tests/ui/panics/panic-macro-explicit.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:panicked at 'explicit panic' +// error-pattern:panicked +// error-pattern:explicit panic // ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-macro-fmt.rs b/tests/ui/panics/panic-macro-fmt.rs index a755ebc0f..0796d33ea 100644 --- a/tests/ui/panics/panic-macro-fmt.rs +++ b/tests/ui/panics/panic-macro-fmt.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:panicked at 'test-fail-fmt 42 rust' +// error-pattern:panicked +// error-pattern:test-fail-fmt 42 rust // ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-macro-owned.rs b/tests/ui/panics/panic-macro-owned.rs index b898fde77..522c87e1c 100644 --- a/tests/ui/panics/panic-macro-owned.rs +++ b/tests/ui/panics/panic-macro-owned.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:panicked at 'test-fail-owned' +// error-pattern:panicked +// error-pattern:test-fail-owned // ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-macro-static.rs b/tests/ui/panics/panic-macro-static.rs index a1d467cbf..06ec5b0ad 100644 --- a/tests/ui/panics/panic-macro-static.rs +++ b/tests/ui/panics/panic-macro-static.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:panicked at 'test-fail-static' +// error-pattern:panicked +// error-pattern:test-fail-static // ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-set-unset-handler.rs b/tests/ui/panics/panic-set-unset-handler.rs index dde0c72f7..91f69f0a6 100644 --- a/tests/ui/panics/panic-set-unset-handler.rs +++ b/tests/ui/panics/panic-set-unset-handler.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:thread 'main' panicked at 'foobar' +// error-pattern:thread 'main' panicked +// error-pattern:foobar // ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-take-handler-nop.rs b/tests/ui/panics/panic-take-handler-nop.rs index 41cbac97c..d14a3244e 100644 --- a/tests/ui/panics/panic-take-handler-nop.rs +++ b/tests/ui/panics/panic-take-handler-nop.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:thread 'main' panicked at 'foobar' +// error-pattern:thread 'main' panicked +// error-pattern:foobar // ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-task-name-none.rs b/tests/ui/panics/panic-task-name-none.rs index 4e95fb5bd..3fb0f3412 100644 --- a/tests/ui/panics/panic-task-name-none.rs +++ b/tests/ui/panics/panic-task-name-none.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:thread '<unnamed>' panicked at 'test' +// error-pattern:thread '<unnamed>' panicked +// error-pattern:test // ignore-emscripten Needs threads use std::thread; diff --git a/tests/ui/panics/panic-task-name-owned.rs b/tests/ui/panics/panic-task-name-owned.rs index f85be7bb8..d5274ebbc 100644 --- a/tests/ui/panics/panic-task-name-owned.rs +++ b/tests/ui/panics/panic-task-name-owned.rs @@ -1,5 +1,6 @@ // run-fail -// error-pattern:thread 'owned name' panicked at 'test' +// error-pattern:thread 'owned name' panicked +// error-pattern:test // ignore-emscripten Needs threads. use std::thread::Builder; diff --git a/tests/ui/panics/runtime-switch.legacy.run.stderr b/tests/ui/panics/runtime-switch.legacy.run.stderr index 0f7655163..bd05b6cc0 100644 --- a/tests/ui/panics/runtime-switch.legacy.run.stderr +++ b/tests/ui/panics/runtime-switch.legacy.run.stderr @@ -1,4 +1,5 @@ -thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:26:5 +thread 'main' panicked at $DIR/runtime-switch.rs:26:5: +explicit panic stack backtrace: 0: std::panicking::begin_panic 1: runtime_switch::main diff --git a/tests/ui/panics/runtime-switch.v0.run.stderr b/tests/ui/panics/runtime-switch.v0.run.stderr index a4ae44131..2078c356d 100644 --- a/tests/ui/panics/runtime-switch.v0.run.stderr +++ b/tests/ui/panics/runtime-switch.v0.run.stderr @@ -1,4 +1,5 @@ -thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:26:5 +thread 'main' panicked at $DIR/runtime-switch.rs:26:5: +explicit panic stack backtrace: 0: std::panicking::begin_panic::<&str> 1: runtime_switch::main 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 2592b7479..2b648a0ca 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,10 +1,13 @@ -thread 'main' panicked at 'debug!!!', $DIR/short-ice-remove-middle-frames-2.rs:56:5 +thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:56:5: +debug!!! stack backtrace: 0: std::panicking::begin_panic 1: short_ice_remove_middle_frames_2::eight 2: short_ice_remove_middle_frames_2::seven::{{closure}} + [... omitted 3 frames ...] 3: short_ice_remove_middle_frames_2::fifth 4: short_ice_remove_middle_frames_2::fourth::{{closure}} + [... omitted 4 frames ...] 5: short_ice_remove_middle_frames_2::first 6: short_ice_remove_middle_frames_2::main 7: core::ops::function::FnOnce::call_once 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 9c15f2e08..5b3726840 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr +++ b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr @@ -1,9 +1,11 @@ -thread 'main' panicked at 'debug!!!', $DIR/short-ice-remove-middle-frames.rs:52:5 +thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:52:5: +debug!!! stack backtrace: 0: std::panicking::begin_panic 1: short_ice_remove_middle_frames::seven 2: short_ice_remove_middle_frames::sixth 3: short_ice_remove_middle_frames::fifth::{{closure}} + [... omitted 4 frames ...] 4: short_ice_remove_middle_frames::second 5: short_ice_remove_middle_frames::first::{{closure}} 6: short_ice_remove_middle_frames::first |