1 // The `format_args!` syntax extension issues errors before code expansion
2 // has completed, but we still need a backtrace.
3 
4 // This test includes stripped-down versions of `print!` and `println!`,
5 // because we can't otherwise verify the lines of the backtrace.
6 
print(_args: std::fmt::Arguments)7 fn print(_args: std::fmt::Arguments) {}
8 
9 macro_rules! myprint {
10     ($($arg:tt)*) => (print(format_args!($($arg)*)));
11 }
12 
13 macro_rules! myprintln {
14     ($fmt:expr) => (myprint!(concat!($fmt, "\n"))); //~ ERROR no arguments were given
15 }
16 
main()17 fn main() {
18     myprintln!("{}");
19 }
20