simplify no-std tests
set panic=abort so that we do not need this eh_personality thing
This commit is contained in:
parent
9a308d45cf
commit
82f2f2f488
5 changed files with 9 additions and 17 deletions
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#![feature(lang_items, unboxed_closures, fn_traits)]
|
||||
#![feature(unboxed_closures, fn_traits)]
|
||||
|
||||
struct S3 {
|
||||
x: i32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue