summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs
blob: 8592f8a728715d5836d9d65e186d8802dfcb306c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// check-pass

fn main() {}

macro_rules! mac_impl {
    ($i:item) => {
        struct S;
        impl S { $i }
    }
}

mac_impl! {
    fn foo() {}
}

macro_rules! mac_trait {
    ($i:item) => {
        trait T { $i }
    }
}

mac_trait! {
    fn foo() {}
}

macro_rules! mac_extern {
    ($i:item) => {
        extern "C" { $i }
    }
}

mac_extern! {
    fn foo();
}