summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macros/macro-named-default.rs
blob: 9b6cd191640ae09595f8cfb6e168352d323467b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-pass
macro_rules! default {
    ($($x:tt)*) => { $($x)* }
}

default! {
    struct A;
}

impl A {
    default! {
        fn foo(&self) {}
    }
}

fn main() {
    A.foo();
}