2023-04-20 09:37:15 -05:00
|
|
|
//@compile-flags: -Clink-arg=-nostartfiles
|
2024-08-17 14:38:10 -05:00
|
|
|
//@ignore-target: apple windows
|
2021-07-19 04:52:05 -05:00
|
|
|
|
|
|
|
#![feature(lang_items, start, libc)]
|
|
|
|
#![no_std]
|
2021-08-08 09:49:13 -05:00
|
|
|
#![allow(clippy::if_same_then_else)]
|
2021-07-19 04:52:05 -05:00
|
|
|
#![allow(clippy::redundant_pattern_matching)]
|
2023-05-22 02:38:16 -05:00
|
|
|
#![allow(clippy::needless_else)]
|
2021-07-19 04:52:05 -05:00
|
|
|
|
|
|
|
use core::panic::PanicInfo;
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl Drop for S {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[start]
|
|
|
|
fn main(argc: isize, argv: *const *const u8) -> isize {
|
|
|
|
if let Some(_) = Some(S) {
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
|
|
|
#[panic_handler]
|
|
|
|
fn panic(_info: &PanicInfo) -> ! {
|
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang = "eh_personality"]
|
|
|
|
extern "C" fn eh_personality() {}
|