about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-10-05 05:16:41 +0000
committerbors <bors@rust-lang.org>2017-10-05 05:16:41 +0000
commita0db04b62bde392fb9846d4a90e3973bab09147a (patch)
treee7f3372b427ba3d0886b44b9767affc59b2a4874 /src/libsyntax/parse
parentbd36dcf7aa2c45b47fe102376222667b0a903c23 (diff)
parent9bbd7a3b3f2f713220f429bd15466135efa7f3b7 (diff)
downloadrust-a0db04b62bde392fb9846d4a90e3973bab09147a.tar.gz
rust-a0db04b62bde392fb9846d4a90e3973bab09147a.zip
Auto merge of #44940 - philipc:remap-path, r=michaelwoerister
Don't use remapped path when loading modules and include files

Fixes bug reported in https://github.com/rust-lang/rust/issues/41555#issuecomment-327866056.

cc @michaelwoerister
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index d5ba4b54d90..65dabe98a06 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -525,7 +525,7 @@ impl<'a> Parser<'a> {
         if let Some(directory) = directory {
             parser.directory = directory;
         } else if parser.span != syntax_pos::DUMMY_SP {
-            parser.directory.path = PathBuf::from(sess.codemap().span_to_filename(parser.span));
+            parser.directory.path = sess.codemap().span_to_unmapped_path(parser.span);
             parser.directory.path.pop();
         }