]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-macro-backtrace.rs
move an `assert!` to the right place
[rust.git] / src / test / ui / methods / method-macro-backtrace.rs
1 // forbid-output: in this expansion of
2
3 macro_rules! make_method {
4     ($name:ident) => ( fn $name(&self) { } )
5 }
6
7 struct S;
8
9 impl S {
10     // We had a bug where these wouldn't clean up macro backtrace frames.
11     make_method!(foo1);
12     make_method!(foo2);
13     make_method!(foo3);
14     make_method!(foo4);
15     make_method!(foo5);
16     make_method!(foo6);
17     make_method!(foo7);
18     make_method!(foo8);
19
20     // Cause an error. It shouldn't have any macro backtrace frames.
21     fn bar(&self) { }
22     fn bar(&self) { } //~ ERROR duplicate definitions
23 }
24
25 fn main() { }