about summary refs log tree commit diff
path: root/tests/ui/lint/non-local-defs/inside-macro_rules.rs
blob: 9f21cc89852e2e8f9f9595008c9a6904eefa2954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ check-pass
//@ edition:2021

macro_rules! m {
    () => {
        trait MacroTrait {}
        struct OutsideStruct;
        fn my_func() {
            impl MacroTrait for OutsideStruct {}
            //~^ WARN non-local `impl` definition
        }
    }
}

m!();

fn main() {}