summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/item-inside-macro.rs
blob: 54bf872d0287d8402105024aca2722375c6f7d54 (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
// run-pass
// Issue #34183

macro_rules! foo {
    () => {
        fn foo() { }
    }
}

macro_rules! bar {
    () => {
        fn bar();
    }
}

trait Bleh {
    foo!();
    bar!();
}

struct Test;

impl Bleh for Test {
    fn bar() {}
}

fn main() {
    Test::bar();
    Test::foo();
}