]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/empty_loop_no_std.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / empty_loop_no_std.rs
index 879d1d5d916e439bf219fef4e343ab0320c13d51..e742b396fcde080256206a9523a65281e788e636 100644 (file)
@@ -1,22 +1,26 @@
+// compile-flags: -Clink-arg=-nostartfiles
 // ignore-macos
-// ignore-windows
 
 #![warn(clippy::empty_loop)]
-#![feature(lang_items, link_args, start, libc)]
-#![link_args = "-nostartfiles"]
+#![feature(lang_items, start, libc)]
 #![no_std]
 
 use core::panic::PanicInfo;
 
 #[start]
 fn main(argc: isize, argv: *const *const u8) -> isize {
+    // This should trigger the lint
     loop {}
 }
 
 #[panic_handler]
 fn panic(_info: &PanicInfo) -> ! {
+    // This should NOT trigger the lint
     loop {}
 }
 
 #[lang = "eh_personality"]
-extern "C" fn eh_personality() {}
+extern "C" fn eh_personality() {
+    // This should also trigger the lint
+    loop {}
+}