Revert a change to the relative path for macro-expanded include!
s
This commit is contained in:
parent
ad7fe6521b
commit
fd12c34601
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue