Skip to content

Commit 3590961

Browse files
committed
Get to query key
1 parent 7c532ea commit 3590961

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

compiler/rustc_attr/src/builtin.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pub enum OptimizeAttr {
9393
/// - `#[unstable]`
9494
#[derive(Encodable, Decodable, Copy, Clone, Debug, PartialEq, Eq, Hash)]
9595
#[derive(HashStable_Generic)]
96+
#[stable_hasher(no_hash_stable_eq)]
9697
pub struct Stability {
9798
pub level: StabilityLevel,
9899
pub feature: Symbol,
@@ -101,6 +102,7 @@ pub struct Stability {
101102
/// Represents the `#[rustc_const_unstable]` and `#[rustc_const_stable]` attributes.
102103
#[derive(Encodable, Decodable, Copy, Clone, Debug, PartialEq, Eq, Hash)]
103104
#[derive(HashStable_Generic)]
105+
#[stable_hasher(no_hash_stable_eq)]
104106
pub struct ConstStability {
105107
pub level: StabilityLevel,
106108
pub feature: Symbol,
@@ -111,6 +113,7 @@ pub struct ConstStability {
111113
/// The available stability levels.
112114
#[derive(Encodable, Decodable, PartialEq, Copy, Clone, Debug, Eq, Hash)]
113115
#[derive(HashStable_Generic)]
116+
#[stable_hasher(no_hash_stable_eq)]
114117
pub enum StabilityLevel {
115118
// Reason for the current stability level and the relevant rust-lang issue
116119
Unstable { reason: Option<Symbol>, issue: Option<NonZeroU32>, is_soft: bool },

compiler/rustc_session/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ pub enum TrimmedDefPaths {
397397
/// *Do not* switch `BTreeMap` out for an unsorted container type! That would break
398398
/// dependency tracking for command-line arguments. Also only hash keys, since tracking
399399
/// should only depend on the output types, not the paths they're written to.
400-
#[derive(Clone, Debug, Hash)]
400+
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
401401
pub struct OutputTypes(BTreeMap<OutputType, Option<PathBuf>>);
402402

403403
impl OutputTypes {
@@ -629,7 +629,7 @@ impl Input {
629629
}
630630
}
631631

632-
#[derive(Clone, Hash, Debug)]
632+
#[derive(Clone, Hash, Debug, PartialEq, Eq)]
633633
pub struct OutputFilenames {
634634
pub out_directory: PathBuf,
635635
filestem: String,

compiler/rustc_session/src/cstore.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ pub enum LinkagePreference {
6565
}
6666

6767
#[derive(Debug, Encodable, Decodable, HashStable_Generic)]
68+
#[stable_hasher(no_hash_stable_eq)]
6869
pub struct NativeLib {
6970
pub kind: NativeLibKind,
7071
pub name: Option<Symbol>,

compiler/rustc_span/src/def_id.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use std::fmt;
1010
use std::hash::{Hash, Hasher};
1111

1212
rustc_index::newtype_index! {
13+
#[derive(HashStableEq)]
1314
pub struct CrateNum {
1415
ENCODABLE = custom
1516
DEBUG_FORMAT = "crate{}"

0 commit comments

Comments
 (0)