diff options
| author | Philip Craig <philipjcraig@gmail.com> | 2017-10-03 19:44:58 +1000 |
|---|---|---|
| committer | Philip Craig <philipjcraig@gmail.com> | 2017-10-03 19:47:33 +1000 |
| commit | 3a225c77bba8576333924e7435493cb4d4e0cbaf (patch) | |
| tree | 5c2d2bf700d90f2f9f7507997f876937dc9ab805 /src/libsyntax/ext | |
| parent | c27a82f19352f37a6b04d7733d28c84494c3afd4 (diff) | |
| download | rust-3a225c77bba8576333924e7435493cb4d4e0cbaf.tar.gz rust-3a225c77bba8576333924e7435493cb4d4e0cbaf.zip | |
Rename FileMap::path and change to an Option
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index c4727b6eda5..614c4a10e6d 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -199,7 +199,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { self.cx.crate_root = std_inject::injected_crate_name(&krate); let mut module = ModuleData { mod_path: vec![Ident::from_str(&self.cx.ecfg.crate_name)], - directory: self.cx.codemap().span_to_path(krate.span), + directory: self.cx.codemap().span_to_unmapped_path(krate.span), }; module.directory.pop(); self.cx.current_expansion.module = Rc::new(module); @@ -951,7 +951,7 @@ impl<'a, 'b> Folder for InvocationCollector<'a, 'b> { module.directory.push(&*item.ident.name.as_str()); } } else { - let mut path = self.cx.parse_sess.codemap().span_to_path(inner); + let mut path = self.cx.parse_sess.codemap().span_to_unmapped_path(inner); let directory_ownership = match path.file_name().unwrap().to_str() { Some("mod.rs") => DirectoryOwnership::Owned, _ => DirectoryOwnership::UnownedViaMod(false), diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index 8bc7f055676..86657e675b2 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -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 = cx.codemap().span_to_path(callsite); + let mut path = cx.codemap().span_to_unmapped_path(callsite); path.pop(); path.push(arg); path |
