2020-01-24 10:50:03 +00:00
|
|
|
// ignore-macos
|
|
|
|
// ignore-windows
|
|
|
|
|
|
|
|
#![warn(clippy::empty_loop)]
|
|
|
|
#![feature(lang_items, link_args, start, libc)]
|
|
|
|
#![link_args = "-nostartfiles"]
|
|
|
|
#![no_std]
|
|
|
|
|
|
|
|
use core::panic::PanicInfo;
|
|
|
|
|
|
|
|
#[start]
|
|
|
|
fn main(argc: isize, argv: *const *const u8) -> isize {
|
2020-10-23 06:39:25 +00:00
|
|
|
// This should trigger the lint
|
2020-01-24 10:50:03 +00:00
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[panic_handler]
|
|
|
|
fn panic(_info: &PanicInfo) -> ! {
|
2020-10-23 06:39:25 +00:00
|
|
|
// This should NOT trigger the lint
|
2020-01-24 10:50:03 +00:00
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang = "eh_personality"]
|
2020-10-23 06:39:25 +00:00
|
|
|
extern "C" fn eh_personality() {
|
|
|
|
// This should also trigger the lint
|
|
|
|
loop {}
|
|
|
|
}
|