summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/deref_addrof_macro.rs
blob: dcebd6c6e29c8474d4537d8e3d1a659051922b09 (plain)
1
2
3
4
5
6
7
8
9
10
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() {}