mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
15 lines
314 B
Rust
15 lines
314 B
Rust
//! Tests macro_metavars_in_unsafe with private (non-exported) macros
|
|
#![warn(clippy::macro_metavars_in_unsafe)]
|
|
|
|
macro_rules! mac {
|
|
($v:expr) => {
|
|
unsafe {
|
|
//~^ ERROR: this macro expands metavariables in an unsafe block
|
|
dbg!($v);
|
|
}
|
|
};
|
|
}
|
|
|
|
fn main() {
|
|
mac!(1);
|
|
}
|