Revert a change to the relative path for macro-expanded include!
s
This commit is contained in:
parent
ad7fe6521b
commit
fd12c34601
@ -197,7 +197,8 @@ pub fn expand_include_bytes(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
||||
fn res_rel_file(cx: &mut ExtCtxt, sp: codemap::Span, arg: &Path) -> PathBuf {
|
||||
// NB: relative paths are resolved relative to the compilation unit
|
||||
if !arg.is_absolute() {
|
||||
let mut cu = PathBuf::from(&cx.codemap().span_to_filename(sp));
|
||||
let callsite = cx.codemap().source_callsite(sp);
|
||||
let mut cu = PathBuf::from(&cx.codemap().span_to_filename(callsite));
|
||||
cu.pop();
|
||||
cu.push(arg);
|
||||
cu
|
||||
|
Loading…
Reference in New Issue
Block a user