]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-macro-backtrace.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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() { }