De-@ codemap and diagnostic.
This commit is contained in:
parent
0bb6de3076
commit
871e570810
33 changed files with 311 additions and 356 deletions
|
@ -57,7 +57,7 @@ pub fn expand_file(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
|||
|
||||
let topmost = topmost_expn_info(cx.backtrace().unwrap());
|
||||
let loc = cx.codemap().lookup_char_pos(topmost.call_site.lo);
|
||||
let filename = token::intern_and_get_ident(loc.file.name);
|
||||
let filename = token::intern_and_get_ident(loc.file.deref().name);
|
||||
base::MRExpr(cx.expr_str(topmost.call_site, filename))
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
|||
// dependency information
|
||||
let filename = file.display().to_str();
|
||||
let interned = token::intern_and_get_ident(src);
|
||||
cx.parse_sess.cm.new_filemap(filename, src);
|
||||
cx.codemap().new_filemap(filename, src);
|
||||
|
||||
base::MRExpr(cx.expr_str(sp, interned))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue