]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51848.rs
Rollup merge of #60492 - acrrd:issues/54054_chain, r=SimonSapin
[rust.git] / src / test / ui / issues / issue-51848.rs
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
3
4 macro_rules! macro_with_error {
5     ( ) => {
6         println!("{"); //~ ERROR invalid
7     };
8 }
9
10 fn foo() {
11
12 }
13
14 fn main() {
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
20 }