We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8188f6c commit ac5cf76Copy full SHA for ac5cf76
compiler/rustc_span/src/lib.rs
@@ -420,9 +420,14 @@ impl RealFileName {
420
/// Update the filename for encoding in the crate metadata.
421
///
422
/// Currently it's about removing the local part when the filename
423
- /// is fully remapped.
+ /// is either fully remapped or not remapped at all.
424
+ #[inline]
425
pub fn update_for_crate_metadata(&mut self) {
- if self.scopes.is_all() {
426
+ if self.scopes.is_all() || self.scopes.is_empty() {
427
+ // NOTE: This works because when the filename is fully
428
+ // remapped, we don't care about the `local` part,
429
+ // and when the filename is not remapped at all,
430
+ // `maybe_remapped` and `local` are equal.
431
self.local = None;
432
}
433
0 commit comments