summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/auxiliary/use_self_macro.rs
blob: a8a85b4baefb728a4cd663ee47c98bceb02aea53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
macro_rules! use_self {
    (
        impl $ty:ident {
            fn func(&$this:ident) {
                [fields($($field:ident)*)]
            }
        }
    ) => (
        impl  $ty {
            fn func(&$this) {
                let $ty { $($field),* } = $this;
            }
        }
    )
}