]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/ice-7410.rs
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / tests / ui / crashes / ice-7410.rs
1 // compile-flags: -Clink-arg=-nostartfiles
2 // ignore-macos
3 // ignore-windows
4
5 #![feature(lang_items, start, libc)]
6 #![no_std]
7 #![allow(clippy::if_same_then_else)]
8 #![allow(clippy::redundant_pattern_matching)]
9
10 use core::panic::PanicInfo;
11
12 struct S;
13
14 impl Drop for S {
15     fn drop(&mut self) {}
16 }
17
18 #[start]
19 fn main(argc: isize, argv: *const *const u8) -> isize {
20     if let Some(_) = Some(S) {
21     } else {
22     }
23     0
24 }
25
26 #[panic_handler]
27 fn panic(_info: &PanicInfo) -> ! {
28     loop {}
29 }
30
31 #[lang = "eh_personality"]
32 extern "C" fn eh_personality() {}