Skip to content

Commit

Permalink
Rollup merge of #88050 - Aaron1011:filename-hash-stable, r=michaelwoe…
Browse files Browse the repository at this point in the history
…rister

Remove `HashStable` impls for `FileName` and `RealFileName`

These impls were unused, and incorrectly hashed the local
(non-remapped) path for `RealFileName::Remapped` (which would
break reproducible builds if these impls were used).
  • Loading branch information
GuillaumeGomez authored Aug 19, 2021
2 parents 8b9a4c3 + d8c3a64 commit 09d56a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ scoped_tls::scoped_thread_local!(static SESSION_GLOBALS: SessionGlobals);
// FIXME: We should use this enum or something like it to get rid of the
// use of magic `/rust/1.x/...` paths across the board.
#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd)]
#[derive(HashStable_Generic, Decodable)]
#[derive(Decodable)]
pub enum RealFileName {
LocalPath(PathBuf),
/// For remapped paths (namely paths into libstd that have been mapped
Expand Down Expand Up @@ -269,7 +269,7 @@ impl RealFileName {

/// Differentiates between real files and common virtual files.
#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash)]
#[derive(HashStable_Generic, Decodable, Encodable)]
#[derive(Decodable, Encodable)]
pub enum FileName {
Real(RealFileName),
/// Call to `quote!`.
Expand Down

0 comments on commit 09d56a7

Please sign in to comment.