]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/default_numeric_fallback_i32.fixed
New upstream version 1.70.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / default_numeric_fallback_i32.fixed
index 3f4994f0453b1ef153fea0355d2a1130f9adafdc..b7485b73dcddd484f2f3626e7a005d05f92f0488 100644 (file)
@@ -1,5 +1,5 @@
 // run-rustfix
-// aux-build:macro_rules.rs
+// aux-build:proc_macros.rs
 
 #![feature(lint_reasons)]
 #![warn(clippy::default_numeric_fallback)]
@@ -9,11 +9,12 @@
     clippy::no_effect,
     clippy::unnecessary_operation,
     clippy::branches_sharing_code,
-    clippy::let_unit_value
+    clippy::let_unit_value,
+    clippy::let_with_type_underscore
 )]
 
-#[macro_use]
-extern crate macro_rules;
+extern crate proc_macros;
+use proc_macros::{external, inline_macros};
 
 mod basic_expr {
     fn test() {
@@ -167,20 +168,17 @@ mod method_calls {
 }
 
 mod in_macro {
-    macro_rules! internal_macro {
-        () => {
-            let x = 22_i32;
-        };
-    }
+    use super::*;
 
     // Should lint in internal macro.
+    #[inline_macros]
     fn internal() {
-        internal_macro!();
+        inline!(let x = 22_i32;);
     }
 
     // Should NOT lint in external macro.
     fn external() {
-        default_numeric_fallback!();
+        external!(let x = 22;);
     }
 }