• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //@compile-flags: -Clink-arg=-nostartfiles
2 //@ignore-target-apple
3 //@ignore-target-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 #![allow(clippy::needless_else)]
10 
11 use core::panic::PanicInfo;
12 
13 struct S;
14 
15 impl Drop for S {
drop(&mut self)16     fn drop(&mut self) {}
17 }
18 
19 #[start]
main(argc: isize, argv: *const *const u8) -> isize20 fn main(argc: isize, argv: *const *const u8) -> isize {
21     if let Some(_) = Some(S) {
22     } else {
23     }
24     0
25 }
26 
27 #[panic_handler]
panic(_info: &PanicInfo) -> !28 fn panic(_info: &PanicInfo) -> ! {
29     loop {}
30 }
31 
32 #[lang = "eh_personality"]
eh_personality()33 extern "C" fn eh_personality() {}
34