// run-rustfix
-// aux-build:macro_rules.rs
+// aux-build:proc_macros.rs
#![feature(lint_reasons)]
#![warn(clippy::default_numeric_fallback)]
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() {
}
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;);
}
}