Don't use remapped path when loading modules and include files

This commit is contained in:
Philip Craig 2017-09-30 16:28:48 +10:00
parent 46ef6208f8
commit c27a82f193
9 changed files with 49 additions and 11 deletions

View file

@ -197,7 +197,7 @@ fn res_rel_file(cx: &mut ExtCtxt, sp: syntax_pos::Span, arg: &Path) -> PathBuf {
// after macro expansion (that is, they are unhygienic).
if !arg.is_absolute() {
let callsite = sp.source_callsite();
let mut path = PathBuf::from(&cx.codemap().span_to_filename(callsite));
let mut path = cx.codemap().span_to_path(callsite);
path.pop();
path.push(arg);
path