about summary refs log tree commit diff
path: root/tests/ui/empty_loop.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2023-03-24 14:04:35 +0100
committerPhilipp Krones <hello@philkrones.com>2023-03-24 14:26:19 +0100
commit8df896c076fd993bad58878ee8a6ed29d8e586ba (patch)
treec0edd67687a954bb38d66e77dae3dbd0db3909c5 /tests/ui/empty_loop.rs
parent58eb9964cc627470cdd9fdcdef872a45615227fe (diff)
downloadrust-8df896c076fd993bad58878ee8a6ed29d8e586ba.tar.gz
rust-8df896c076fd993bad58878ee8a6ed29d8e586ba.zip
Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyup
Diffstat (limited to 'tests/ui/empty_loop.rs')
-rw-r--r--tests/ui/empty_loop.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/ui/empty_loop.rs b/tests/ui/empty_loop.rs
index 8fd7697eb3b..6a8e6b550c1 100644
--- a/tests/ui/empty_loop.rs
+++ b/tests/ui/empty_loop.rs
@@ -1,9 +1,9 @@
-// aux-build:macro_rules.rs
+// aux-build:proc_macros.rs
 
 #![warn(clippy::empty_loop)]
 
-#[macro_use]
-extern crate macro_rules;
+extern crate proc_macros;
+use proc_macros::{external, inline_macros};
 
 fn should_trigger() {
     loop {}
@@ -16,6 +16,7 @@ fn should_trigger() {
     }
 }
 
+#[inline_macros]
 fn should_not_trigger() {
     loop {
         panic!("This is fine")
@@ -38,14 +39,10 @@ fn should_not_trigger() {
     loop {}
 
     // We don't lint loops inside macros
-    macro_rules! foo {
-        () => {
-            loop {}
-        };
-    }
+    inline!(loop {});
 
     // We don't lint external macros
-    foofoo!()
+    external!(loop {});
 }
 
 fn main() {}