2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-27 21:43:30 +00:00
rust-clippy/tests/ui/deref_addrof_macro.rs
2019-09-03 00:17:23 +09:00

10 lines
191 B
Rust

macro_rules! m {
($($x:tt),*) => { &[$(($x, stringify!(x)),)*] };
}
#[warn(clippy::deref_addrof)]
fn f() -> [(i32, &'static str); 3] {
*m![1, 2, 3] // should be fine
}
fn main() {}