1 // aux-build:format-string-proc-macro.rs
4 extern crate format_string_proc_macro;
7 // If the format string is another macro invocation, rustc would previously
8 // compute nonsensical spans, such as:
10 // error: invalid format string: unmatched `}` found
13 // 2 | format!(concat!("abc}"));
14 // | ^ unmatched `}` in format string
16 // This test checks that this behavior has been fixed.
19 format!(concat!("abc}"));
20 //~^ ERROR: invalid format string: unmatched `}` found
22 format!(err_with_input_span!(""));
23 //~^ ERROR: invalid format string: unmatched `}` found