Skip to content

Commit 11a1772

Browse files
committed
Auto merge of #141133 - matthiaskrgr:rollup-u8ndxyz, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #135808 (Implement Display for ``rustc_target::callconv::Conv``) - #137432 (Add as_ascii_unchecked() methods to char, u8, and str) - #139103 (deduplicate abort implementations) - #140917 (checktools.sh: fix bashism) - #141035 (turn lld warning on old gccs into info log) - #141118 (Enable rust-analyzer to go from query definition to the corresponding provider field) - #141121 (Only select true errors in `impossible_predicates`) - #141125 (check coroutines with `TypingMode::Borrowck` to avoid cyclic reasoning) - #141131 (Make some `match`es slightly more ergonomic in `librustdoc`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 5a7e23a + 20f3abb commit 11a1772

38 files changed

+65
-58
lines changed

src/helpers.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -932,12 +932,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
932932
self.read_c_str_with_char_size(ptr, wchar_t.size, wchar_t.align.abi)
933933
}
934934

935-
/// Check that the ABI is what we expect.
936-
fn check_abi<'a>(&self, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, exp_abi: Conv) -> InterpResult<'a, ()> {
935+
/// Check that the calling convention is what we expect.
936+
fn check_callconv<'a>(&self, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, exp_abi: Conv) -> InterpResult<'a, ()> {
937937
if fn_abi.conv != exp_abi {
938938
throw_ub_format!(
939-
"calling a function with ABI {:?} using caller ABI {:?}",
940-
exp_abi,
939+
"calling a function with calling convention {exp_abi} using caller calling convention {}",
941940
fn_abi.conv
942941
);
943942
}
@@ -973,7 +972,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
973972
exp_abi: Conv,
974973
link_name: Symbol,
975974
) -> InterpResult<'tcx, ()> {
976-
self.check_abi(abi, exp_abi)?;
975+
self.check_callconv(abi, exp_abi)?;
977976
if let Some((body, instance)) = self.eval_context_mut().lookup_exported_symbol(link_name)? {
978977
// If compiler-builtins is providing the symbol, then don't treat it as a clash.
979978
// We'll use our built-in implementation in `emulate_foreign_item_inner` for increased

tests/fail/alloc/alloc_error_handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@error-in-other-file: aborted
2-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
2+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
33
//@normalize-stderr-test: "\| +\^+" -> "| ^"
44
#![feature(allocator_api)]
55

tests/fail/alloc/alloc_error_handler.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ memory allocation of 4 bytes failed
22
error: abnormal termination: the program aborted execution
33
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
44
|
5-
LL | ABORT();
5+
LL | ABORT()
66
| ^ the program aborted execution
77
|
88
= note: BACKTRACE:

tests/fail/function_calls/check_arg_abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ fn main() {
44
}
55

66
unsafe {
7-
let _ = malloc(0); //~ ERROR: calling a function with ABI C using caller ABI Rust
7+
let _ = malloc(0); //~ ERROR: calling a function with calling convention "C" using caller calling convention "Rust"
88
};
99
}

tests/fail/function_calls/check_arg_abi.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: calling a function with ABI C using caller ABI Rust
1+
error: Undefined Behavior: calling a function with calling convention "C" using caller calling convention "Rust"
22
--> tests/fail/function_calls/check_arg_abi.rs:LL:CC
33
|
44
LL | let _ = malloc(0);
5-
| ^^^^^^^^^ calling a function with ABI C using caller ABI Rust
5+
| ^^^^^^^^^ calling a function with calling convention "C" using caller calling convention "Rust"
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/function_calls/check_callback_abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn main() {
99
// Make sure we check the ABI when Miri itself invokes a function
1010
// as part of a shim implementation.
1111
std::intrinsics::catch_unwind(
12-
//~^ ERROR: calling a function with calling convention C using calling convention Rust
12+
//~^ ERROR: calling a function with calling convention "C" using calling convention "Rust"
1313
std::mem::transmute::<extern "C" fn(*mut u8), _>(try_fn),
1414
std::ptr::null_mut(),
1515
|_, _| unreachable!(),

tests/fail/function_calls/check_callback_abi.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: Undefined Behavior: calling a function with calling convention C using calling convention Rust
1+
error: Undefined Behavior: calling a function with calling convention "C" using calling convention "Rust"
22
--> tests/fail/function_calls/check_callback_abi.rs:LL:CC
33
|
44
LL | / std::intrinsics::catch_unwind(
@@ -7,7 +7,7 @@ LL | | std::mem::transmute::<extern "C" fn(*mut u8), _>(try_fn),
77
LL | | std::ptr::null_mut(),
88
LL | | |_, _| unreachable!(),
99
LL | | );
10-
| |_________^ calling a function with calling convention C using calling convention Rust
10+
| |_________^ calling a function with calling convention "C" using calling convention "Rust"
1111
|
1212
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
1313
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/function_calls/exported_symbol_abi_mismatch.cache.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: calling a function with calling convention Rust using calling convention C
1+
error: Undefined Behavior: calling a function with calling convention "Rust" using calling convention "C"
22
--> tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC
33
|
44
LL | foo();
5-
| ^^^^^ calling a function with calling convention Rust using calling convention C
5+
| ^^^^^ calling a function with calling convention "Rust" using calling convention "C"
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/function_calls/exported_symbol_abi_mismatch.fn_ptr.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: calling a function with calling convention Rust using calling convention C
1+
error: Undefined Behavior: calling a function with calling convention "Rust" using calling convention "C"
22
--> tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC
33
|
44
LL | std::mem::transmute::<unsafe fn(), unsafe extern "C" fn()>(foo)();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling a function with calling convention Rust using calling convention C
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling a function with calling convention "Rust" using calling convention "C"
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/function_calls/exported_symbol_abi_mismatch.no_cache.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: calling a function with calling convention Rust using calling convention C
1+
error: Undefined Behavior: calling a function with calling convention "Rust" using calling convention "C"
22
--> tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC
33
|
44
LL | foo();
5-
| ^^^^^ calling a function with calling convention Rust using calling convention C
5+
| ^^^^^ calling a function with calling convention "Rust" using calling convention "C"
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/function_calls/exported_symbol_abi_mismatch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
#[cfg(fn_ptr)]
1313
unsafe {
1414
std::mem::transmute::<unsafe fn(), unsafe extern "C" fn()>(foo)();
15-
//~[fn_ptr]^ ERROR: calling a function with calling convention Rust using calling convention C
15+
//~[fn_ptr]^ ERROR: calling a function with calling convention "Rust" using calling convention "C"
1616
}
1717

1818
// `Instance` caching should not suppress ABI check.
@@ -28,8 +28,8 @@ fn main() {
2828
}
2929
unsafe {
3030
foo();
31-
//~[no_cache]^ ERROR: calling a function with calling convention Rust using calling convention C
32-
//~[cache]| ERROR: calling a function with calling convention Rust using calling convention C
31+
//~[no_cache]^ ERROR: calling a function with calling convention "Rust" using calling convention "C"
32+
//~[cache]| ERROR: calling a function with calling convention "Rust" using calling convention "C"
3333
}
3434
}
3535
}

tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ thread caused non-unwinding panic. aborting.
1111
error: abnormal termination: the program aborted execution
1212
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1313
|
14-
LL | ABORT();
14+
LL | ABORT()
1515
| ^ the program aborted execution
1616
|
1717
= note: BACKTRACE:

tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ thread caused non-unwinding panic. aborting.
1111
error: abnormal termination: the program aborted execution
1212
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1313
|
14-
LL | ABORT();
14+
LL | ABORT()
1515
| ^ the program aborted execution
1616
|
1717
= note: BACKTRACE:

tests/fail/function_calls/exported_symbol_bad_unwind2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@revisions: extern_block definition both
2-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
2+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
33
//@normalize-stderr-test: "\| +\^+" -> "| ^"
44
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
55
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

tests/fail/intrinsics/uninit_uninhabited_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
1+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
22
//@normalize-stderr-test: "\| +\^+" -> "| ^"
33
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
44
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

tests/fail/intrinsics/uninit_uninhabited_type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ thread caused non-unwinding panic. aborting.
77
error: abnormal termination: the program aborted execution
88
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
99
|
10-
LL | ABORT();
10+
LL | ABORT()
1111
| ^ the program aborted execution
1212
|
1313
= note: BACKTRACE:

tests/fail/intrinsics/zero_fn_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
1+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
22
//@normalize-stderr-test: "\| +\^+" -> "| ^"
33
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
44
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

tests/fail/intrinsics/zero_fn_ptr.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ thread caused non-unwinding panic. aborting.
77
error: abnormal termination: the program aborted execution
88
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
99
|
10-
LL | ABORT();
10+
LL | ABORT()
1111
| ^ the program aborted execution
1212
|
1313
= note: BACKTRACE:

tests/fail/panic/abort_unwind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@error-in-other-file: the program aborted execution
2-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
2+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
33
//@normalize-stderr-test: "\| +\^+" -> "| ^"
44
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
55
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

tests/fail/panic/abort_unwind.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ thread caused non-unwinding panic. aborting.
1111
error: abnormal termination: the program aborted execution
1212
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1313
|
14-
LL | ABORT();
14+
LL | ABORT()
1515
| ^ the program aborted execution
1616
|
1717
= note: BACKTRACE:

tests/fail/panic/double_panic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
1+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
22
//@normalize-stderr-test: "\| +\^+" -> "| ^"
33
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
44
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

tests/fail/panic/double_panic.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ thread caused non-unwinding panic. aborting.
1414
error: abnormal termination: the program aborted execution
1515
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1616
|
17-
LL | ABORT();
17+
LL | ABORT()
1818
| ^ the program aborted execution
1919
|
2020
= note: BACKTRACE:

tests/fail/panic/panic_abort1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@error-in-other-file: the program aborted execution
22
//@normalize-stderr-test: "\| +\^+" -> "| ^"
3-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\); \}|core::intrinsics::abort\(\);" -> "ABORT();"
3+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
44
//@compile-flags: -C panic=abort
55

66
fn main() {

tests/fail/panic/panic_abort1.stderr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ panicking from libstd
44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
55
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
66
error: abnormal termination: the program aborted execution
7-
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
7+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
88
|
9-
LL | ABORT();
9+
LL | ABORT()
1010
| ^ the program aborted execution
1111
|
1212
= note: BACKTRACE:
13-
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
13+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
14+
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
15+
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
1416
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
1517
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1618
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC

tests/fail/panic/panic_abort2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@error-in-other-file: the program aborted execution
22
//@normalize-stderr-test: "\| +\^+" -> "| ^"
3-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\); \}|core::intrinsics::abort\(\);" -> "ABORT();"
3+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
44
//@compile-flags: -C panic=abort
55

66
fn main() {

tests/fail/panic/panic_abort2.stderr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ thread 'main' panicked at tests/fail/panic/panic_abort2.rs:LL:CC:
44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
55
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
66
error: abnormal termination: the program aborted execution
7-
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
7+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
88
|
9-
LL | ABORT();
9+
LL | ABORT()
1010
| ^ the program aborted execution
1111
|
1212
= note: BACKTRACE:
13-
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
13+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
14+
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
15+
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
1416
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
1517
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1618
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC

tests/fail/panic/panic_abort3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@error-in-other-file: the program aborted execution
22
//@normalize-stderr-test: "\| +\^+" -> "| ^"
3-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\); \}|core::intrinsics::abort\(\);" -> "ABORT();"
3+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
44
//@compile-flags: -C panic=abort
55

66
fn main() {

tests/fail/panic/panic_abort3.stderr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ panicking from libcore
44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
55
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
66
error: abnormal termination: the program aborted execution
7-
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
7+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
88
|
9-
LL | ABORT();
9+
LL | ABORT()
1010
| ^ the program aborted execution
1111
|
1212
= note: BACKTRACE:
13-
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
13+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
14+
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
15+
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
1416
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
1517
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1618
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC

tests/fail/panic/panic_abort4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@error-in-other-file: the program aborted execution
22
//@normalize-stderr-test: "\| +\^+" -> "| ^"
3-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\); \}|core::intrinsics::abort\(\);" -> "ABORT();"
3+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
44
//@compile-flags: -C panic=abort
55

66
fn main() {

tests/fail/panic/panic_abort4.stderr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ thread 'main' panicked at tests/fail/panic/panic_abort4.rs:LL:CC:
44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
55
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
66
error: abnormal termination: the program aborted execution
7-
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
7+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
88
|
9-
LL | ABORT();
9+
LL | ABORT()
1010
| ^ the program aborted execution
1111
|
1212
= note: BACKTRACE:
13-
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
13+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
14+
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
15+
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
1416
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
1517
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
1618
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC

tests/fail/ptr_swap_nonoverlapping.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This is a regression test for <https://github.com/rust-lang/miri/issues/4188>: The precondition
22
//! check in `ptr::swap_nonoverlapping` was incorrectly disabled in Miri.
3-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
3+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
44
//@normalize-stderr-test: "\| +\^+" -> "| ^"
55
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
66
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

tests/fail/ptr_swap_nonoverlapping.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ thread caused non-unwinding panic. aborting.
99
error: abnormal termination: the program aborted execution
1010
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1111
|
12-
LL | ABORT();
12+
LL | ABORT()
1313
| ^ the program aborted execution
1414
|
1515
= note: BACKTRACE:

tests/fail/tail_calls/cc-mismatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@error-in-other-file: Undefined Behavior: calling a function with calling convention C using calling convention Rust
1+
//@error-in-other-file: Undefined Behavior: calling a function with calling convention "C" using calling convention "Rust"
22
#![feature(explicit_tail_calls)]
33
#![allow(incomplete_features)]
44

tests/fail/tail_calls/cc-mismatch.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: calling a function with calling convention C using calling convention Rust
1+
error: Undefined Behavior: calling a function with calling convention "C" using calling convention "Rust"
22
--> RUSTLIB/core/src/ops/function.rs:LL:CC
33
|
44
LL | extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling a function with calling convention C using calling convention Rust
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling a function with calling convention "C" using calling convention "Rust"
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/terminate-terminator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Zmir-opt-level=3 -Zinline-mir-hint-threshold=1000
2-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
2+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
33
//@normalize-stderr-test: "\| +\^+" -> "| ^"
44
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
55
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

tests/fail/terminate-terminator.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ thread caused non-unwinding panic. aborting.
1313
error: abnormal termination: the program aborted execution
1414
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1515
|
16-
LL | ABORT();
16+
LL | ABORT()
1717
| ^ the program aborted execution
1818
|
1919
= note: BACKTRACE:

tests/fail/unwind-action-terminate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@error-in-other-file: aborted execution
2-
//@normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
2+
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
33
//@normalize-stderr-test: "\| +\^+" -> "| ^"
44
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
55
//@normalize-stderr-test: "\n +at [^\n]+" -> ""

0 commit comments

Comments
 (0)