]>
Commit | Line | Data |
---|---|---|
8faf50e0 XL |
1 | // In case of macro expansion, the errors should be matched using the deepest callsite in the |
2 | // macro call stack whose span is in the current file | |
1a4d82fc | 3 | |
8faf50e0 XL |
4 | macro_rules! macro_with_error { |
5 | ( ) => { | |
6 | println!("{"); //~ ERROR invalid | |
7 | }; | |
1a4d82fc JJ |
8 | } |
9 | ||
8faf50e0 XL |
10 | fn foo() { |
11 | ||
1a4d82fc JJ |
12 | } |
13 | ||
14 | fn main() { | |
8faf50e0 XL |
15 | macro_with_error!(); |
16 | //^ In case of a local macro we want the error to be matched in the macro definition, not here | |
17 | ||
18 | println!("}"); //~ ERROR invalid | |
19 | //^ In case of an external macro we want the error to be matched here | |
1a4d82fc | 20 | } |