mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 12:03:28 +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);
|
|
}
|