diff options
| author | Ralf Jung <post@ralfj.de> | 2024-03-09 19:10:33 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-03-09 19:10:37 +0100 |
| commit | 82f2f2f488d37770b851ce8571e5b1da9da2cdd2 (patch) | |
| tree | a717b8c5529d5c51c4d6266f93818ea44b139c10 /src | |
| parent | 9a308d45cf586750eca6521eaa680fea4f6f4049 (diff) | |
| download | rust-82f2f2f488d37770b851ce8571e5b1da9da2cdd2.tar.gz rust-82f2f2f488d37770b851ce8571e5b1da9da2cdd2.zip | |
simplify no-std tests
set panic=abort so that we do not need this eh_personality thing
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/tests/fail/alloc/no_global_allocator.rs | 6 | ||||
| -rw-r--r-- | src/tools/miri/tests/fail/panic/no_std.rs | 6 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/miri-alloc.rs | 6 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/no_std.rs | 6 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/overloaded-calls-simple.rs | 2 |
5 files changed, 9 insertions, 17 deletions
diff --git a/src/tools/miri/tests/fail/alloc/no_global_allocator.rs b/src/tools/miri/tests/fail/alloc/no_global_allocator.rs index 624ad1bda58..0952b2c46ba 100644 --- a/src/tools/miri/tests/fail/alloc/no_global_allocator.rs +++ b/src/tools/miri/tests/fail/alloc/no_global_allocator.rs @@ -1,7 +1,8 @@ +//@compile-flags: -Cpanic=abort //@normalize-stderr-test: "OS `.*`" -> "$$OS" // Make sure we pretend the allocation symbols don't exist when there is no allocator -#![feature(lang_items, start)] +#![feature(start)] #![no_std] extern "Rust" { @@ -21,6 +22,3 @@ fn start(_: isize, _: *const *const u8) -> isize { fn panic_handler(_: &core::panic::PanicInfo) -> ! { loop {} } - -#[lang = "eh_personality"] -fn eh_personality() {} diff --git a/src/tools/miri/tests/fail/panic/no_std.rs b/src/tools/miri/tests/fail/panic/no_std.rs index 589f843cf82..bad425804dc 100644 --- a/src/tools/miri/tests/fail/panic/no_std.rs +++ b/src/tools/miri/tests/fail/panic/no_std.rs @@ -1,5 +1,6 @@ -#![feature(lang_items, start, core_intrinsics)] +#![feature(start, core_intrinsics)] #![no_std] +//@compile-flags: -Cpanic=abort // windows tls dtors go through libstd right now, thus this test // cannot pass. When windows tls dtors go through the special magic // windows linker section, we can run this test on windows again. @@ -36,6 +37,3 @@ fn panic_handler(panic_info: &core::panic::PanicInfo) -> ! { writeln!(HostErr, "{panic_info}").ok(); core::intrinsics::abort(); //~ ERROR: the program aborted execution } - -#[lang = "eh_personality"] -fn eh_personality() {} diff --git a/src/tools/miri/tests/pass/miri-alloc.rs b/src/tools/miri/tests/pass/miri-alloc.rs index f6464b5bd01..8f172475418 100644 --- a/src/tools/miri/tests/pass/miri-alloc.rs +++ b/src/tools/miri/tests/pass/miri-alloc.rs @@ -1,5 +1,6 @@ -#![feature(lang_items, start)] +#![feature(start)] #![no_std] +//@compile-flags: -Cpanic=abort // windows tls dtors go through libstd right now, thus this test // cannot pass. When windows tls dtors go through the special magic // windows linker section, we can run this test on windows again. @@ -24,6 +25,3 @@ fn start(_: isize, _: *const *const u8) -> isize { fn panic_handler(_: &core::panic::PanicInfo) -> ! { loop {} } - -#[lang = "eh_personality"] -fn eh_personality() {} diff --git a/src/tools/miri/tests/pass/no_std.rs b/src/tools/miri/tests/pass/no_std.rs index 3bece7783f7..3c98ee50aa9 100644 --- a/src/tools/miri/tests/pass/no_std.rs +++ b/src/tools/miri/tests/pass/no_std.rs @@ -1,4 +1,5 @@ -#![feature(lang_items, start)] +//@compile-flags: -Cpanic=abort +#![feature(start)] #![no_std] // Plumbing to let us use `writeln!` to host stdout: @@ -32,6 +33,3 @@ fn start(_: isize, _: *const *const u8) -> isize { fn panic_handler(_: &core::panic::PanicInfo) -> ! { loop {} } - -#[lang = "eh_personality"] -fn eh_personality() {} diff --git a/src/tools/miri/tests/pass/overloaded-calls-simple.rs b/src/tools/miri/tests/pass/overloaded-calls-simple.rs index 9fcf7d4a819..d13bf34fc5e 100644 --- a/src/tools/miri/tests/pass/overloaded-calls-simple.rs +++ b/src/tools/miri/tests/pass/overloaded-calls-simple.rs @@ -1,4 +1,4 @@ -#![feature(lang_items, unboxed_closures, fn_traits)] +#![feature(unboxed_closures, fn_traits)] struct S3 { x: i32, |
