Skip to content

Commit c479d2f

Browse files
Remove all uses of #[stable_hasher(project(...))] in order to mitigate
incremental compilation related ICEs as reported in rust-lang#94124 for Rust 1.59.
1 parent 62afddb commit c479d2f

File tree

10 files changed

+1753
-1952
lines changed

10 files changed

+1753
-1952
lines changed

Diff for: compiler/rustc_hir/src/hir.rs

-8
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ impl Path<'_> {
205205
#[derive(Debug, HashStable_Generic)]
206206
pub struct PathSegment<'hir> {
207207
/// The identifier portion of this path segment.
208-
#[stable_hasher(project(name))]
209208
pub ident: Ident,
210209
// `id` and `res` are optional. We currently only use these in save-analysis,
211210
// any path segments without these will not have save-analysis info and
@@ -850,7 +849,6 @@ pub struct PatField<'hir> {
850849
#[stable_hasher(ignore)]
851850
pub hir_id: HirId,
852851
/// The identifier for the field.
853-
#[stable_hasher(project(name))]
854852
pub ident: Ident,
855853
/// The pattern the field is destructured to.
856854
pub pat: &'hir Pat<'hir>,
@@ -2127,7 +2125,6 @@ pub const FN_OUTPUT_NAME: Symbol = sym::Output;
21272125
#[derive(Debug, HashStable_Generic)]
21282126
pub struct TypeBinding<'hir> {
21292127
pub hir_id: HirId,
2130-
#[stable_hasher(project(name))]
21312128
pub ident: Ident,
21322129
pub gen_args: &'hir GenericArgs<'hir>,
21332130
pub kind: TypeBindingKind<'hir>,
@@ -2515,7 +2512,6 @@ pub struct EnumDef<'hir> {
25152512
#[derive(Debug, HashStable_Generic)]
25162513
pub struct Variant<'hir> {
25172514
/// Name of the variant.
2518-
#[stable_hasher(project(name))]
25192515
pub ident: Ident,
25202516
/// Id of the variant (not the constructor, see `VariantData::ctor_hir_id()`).
25212517
pub id: HirId,
@@ -2605,7 +2601,6 @@ impl VisibilityKind<'_> {
26052601
#[derive(Debug, HashStable_Generic)]
26062602
pub struct FieldDef<'hir> {
26072603
pub span: Span,
2608-
#[stable_hasher(project(name))]
26092604
pub ident: Ident,
26102605
pub vis: Visibility<'hir>,
26112606
pub hir_id: HirId,
@@ -2864,7 +2859,6 @@ impl ItemKind<'_> {
28642859
#[derive(Encodable, Debug, HashStable_Generic)]
28652860
pub struct TraitItemRef {
28662861
pub id: TraitItemId,
2867-
#[stable_hasher(project(name))]
28682862
pub ident: Ident,
28692863
pub kind: AssocItemKind,
28702864
pub span: Span,
@@ -2880,7 +2874,6 @@ pub struct TraitItemRef {
28802874
#[derive(Debug, HashStable_Generic)]
28812875
pub struct ImplItemRef {
28822876
pub id: ImplItemId,
2883-
#[stable_hasher(project(name))]
28842877
pub ident: Ident,
28852878
pub kind: AssocItemKind,
28862879
pub span: Span,
@@ -2919,7 +2912,6 @@ impl ForeignItemId {
29192912
#[derive(Debug, HashStable_Generic)]
29202913
pub struct ForeignItemRef {
29212914
pub id: ForeignItemId,
2922-
#[stable_hasher(project(name))]
29232915
pub ident: Ident,
29242916
pub span: Span,
29252917
}

Diff for: compiler/rustc_middle/src/ty/assoc.rs

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ impl AssocItemContainer {
4343
#[derive(Copy, Clone, Debug, PartialEq, HashStable, Eq, Hash)]
4444
pub struct AssocItem {
4545
pub def_id: DefId,
46-
#[stable_hasher(project(name))]
4746
pub ident: Ident,
4847
pub kind: AssocKind,
4948
pub vis: Visibility,

Diff for: compiler/rustc_middle/src/ty/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,6 @@ pub struct VariantDef {
15021502
/// If this variant is a struct variant, then this is `None`.
15031503
pub ctor_def_id: Option<DefId>,
15041504
/// Variant or struct name.
1505-
#[stable_hasher(project(name))]
15061505
pub ident: Ident,
15071506
/// Discriminant of this variant.
15081507
pub discr: VariantDiscr,
@@ -1598,7 +1597,6 @@ pub enum VariantDiscr {
15981597
#[derive(Debug, HashStable, TyEncodable, TyDecodable)]
15991598
pub struct FieldDef {
16001599
pub did: DefId,
1601-
#[stable_hasher(project(name))]
16021600
pub ident: Ident,
16031601
pub vis: Visibility,
16041602
}

0 commit comments

Comments
 (0)