summary refs log tree commit diff
path: root/src/test/ui/macros/macro-in-expression-context.rs
blob: b3f5e568967e8604a1ae0153575140d0e6113128 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-rustfix

macro_rules! foo {
    () => {
        assert_eq!("A", "A");
        assert_eq!("B", "B");
    }
    //~^^ ERROR macro expansion ignores token `assert_eq` and any following
    //~| NOTE the usage of `foo!` is likely invalid in expression context
}

fn main() {
    foo!()
    //~^ NOTE caused by the macro expansion here
}