diff --git a/tests/fail/alloc/no_global_allocator.rs b/tests/fail/alloc/no_global_allocator.rs index 624ad1bda5..0952b2c46b 100644 --- a/tests/fail/alloc/no_global_allocator.rs +++ b/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/tests/fail/panic/no_std.rs b/tests/fail/panic/no_std.rs index 589f843cf8..bad425804d 100644 --- a/tests/fail/panic/no_std.rs +++ b/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/tests/pass/miri-alloc.rs b/tests/pass/miri-alloc.rs index f6464b5bd0..8f17247541 100644 --- a/tests/pass/miri-alloc.rs +++ b/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/tests/pass/no_std.rs b/tests/pass/no_std.rs index 3bece7783f..3c98ee50aa 100644 --- a/tests/pass/no_std.rs +++ b/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/tests/pass/overloaded-calls-simple.rs b/tests/pass/overloaded-calls-simple.rs index 9fcf7d4a81..d13bf34fc5 100644 --- a/tests/pass/overloaded-calls-simple.rs +++ b/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,