rust-clippy/tests/ui/crashes/ice-7410.rs

33 lines
580 B
Rust
Raw Normal View History

//@compile-flags: -Clink-arg=-nostartfiles
2024-08-17 19:38:10 +00:00
//@ignore-target: apple windows
#![feature(lang_items, start, libc)]
#![no_std]
2021-08-08 14:49:13 +00:00
#![allow(clippy::if_same_then_else)]
#![allow(clippy::redundant_pattern_matching)]
#![allow(clippy::needless_else)]
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() {}