Closed
Description
In the following code, the error message refers to the location of the macro calls at HERE, not NOTHERE. I think this (a) isn't what happens in C, etc., and (b) is never useful.
Fixing this should be a simple mater of getting the syntax backtrace from cx in source_util.rs and finding the topmost span, and ignoring the span that's temptingly passed in as an argument. Except that the results won't be any different until #3065 is fixed.
macro_rules! my_complex_macro {
{ } => {
fmt!("You invoked the macro wrong! (%s:%u:%u)",
file!(), line!(), col!()) //HERE
}
}
fn main() {
io::println(my_complex_macro!()); //NOT HERE
}