Fix macro backtraces.
In addition add information about the macro doing the expansion, and move the printing of the expansion backtrace from codemap::span_to_str to the diagnostic code. The backtrace is now more verbose and includes information on the macro doing the expansion, in addition to the expansion site.
This commit is contained in:
parent
1d855ebc51
commit
b7ec2488ff
7 changed files with 72 additions and 59 deletions
|
@ -7,7 +7,7 @@ fn respan<T: copy>(sp: span, t: T) -> spanned<T> {
|
|||
|
||||
/* assuming that we're not in macro expansion */
|
||||
fn mk_sp(lo: uint, hi: uint) -> span {
|
||||
ret {lo: lo, hi: hi, expanded_from: codemap::os_none};
|
||||
ret {lo: lo, hi: hi, expn_info: none};
|
||||
}
|
||||
|
||||
// make this a const, once the compiler supports it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue