Rename RealFileName::Named to LocalPath and Devirtualized to Remapped

This commit is contained in:
Andy Wang 2021-04-03 16:59:31 +01:00
parent d66506d353
commit 6720a37042
No known key found for this signature in database
GPG key ID: 181B49F9F38F3374
13 changed files with 82 additions and 132 deletions

View file

@ -361,7 +361,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
// FIXME: Avoid visiting the crate as a `Mod` item,
// make crate a first class expansion target instead.
pub fn expand_crate(&mut self, mut krate: ast::Crate) -> ast::Crate {
let file_path = match self.cx.source_map().span_to_unmapped_path(krate.span) {
let file_path = match self.cx.source_map().span_to_filename(krate.span) {
FileName::Real(name) => name.into_local_path(),
other => PathBuf::from(other.to_string()),
};