1
Fork 0

Merge ExpnId and SyntaxContext.

This commit is contained in:
Jeffrey Seyfried 2017-03-17 04:04:41 +00:00
parent 496996c2af
commit ec7c0aece1
46 changed files with 456 additions and 702 deletions

View file

@ -185,7 +185,7 @@ pub fn expand_include_bytes(cx: &mut ExtCtxt, sp: Span, tts: &[tokenstream::Toke
fn res_rel_file(cx: &mut ExtCtxt, sp: syntax_pos::Span, arg: &Path) -> PathBuf {
// NB: relative paths are resolved relative to the compilation unit
if !arg.is_absolute() {
let callsite = cx.codemap().source_callsite(sp);
let callsite = sp.source_callsite();
let mut cu = PathBuf::from(&cx.codemap().span_to_filename(callsite));
cu.pop();
cu.push(arg);