os-rust/tests/ui/lint/non-local-defs/inside-macro_rules.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
281 B
Rust
Raw Normal View History

//@ 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() {}