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:
Kevin Atkinson 2012-02-04 18:37:24 -07:00 committed by Brian Anderson
parent 1d855ebc51
commit b7ec2488ff
7 changed files with 72 additions and 59 deletions

View file

@ -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