Closed
Description
We we import SourceFile
s from a foreign crate, we try to 'devirtualize' paths pointing into the standard library crates. However, this only occurs if the user has the Rust source available locally (through the rust-src
component):
rust/compiler/rustc_metadata/src/rmeta/decoder.rs
Lines 1614 to 1625 in 5e65467
The filename ends up getting hashed in the HashStable
impl for Span
. This means that the Fingerprint
of a Span
we load from another crate can change across compilation sessions, depending on whether or not the rust-src
component is present.