Skip to content

Commit

Permalink
Hash full Ident (including Span) in AssocItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Jan 13, 2022
1 parent 124555a commit 3803582
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
1 change: 0 additions & 1 deletion compiler/rustc_middle/src/ty/assoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ impl AssocItemContainer {
#[derive(Copy, Clone, Debug, PartialEq, HashStable, Eq, Hash)]
pub struct AssocItem {
pub def_id: DefId,
#[stable_hasher(project(name))]
pub ident: Ident,
pub kind: AssocKind,
pub vis: Visibility,
Expand Down
10 changes: 5 additions & 5 deletions src/test/incremental/hashes/inherent_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl Foo {
impl Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(cfg="cfail5", except="associated_item")]
#[rustc_clean(cfg="cfail6")]
pub fn add_method_to_impl1(&self) { }

Expand Down Expand Up @@ -704,7 +704,7 @@ impl<T> Bar<T> {
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(
cfg="cfail5",
except="generics_of,fn_sig,typeck,type_of,optimized_mir"
except="generics_of,fn_sig,typeck,type_of,optimized_mir,associated_item"
)]
#[rustc_clean(cfg="cfail6")]
pub fn add_type_parameter_to_impl(&self) { }
Expand All @@ -726,7 +726,7 @@ impl Bar<u32> {
impl Bar<u64> {
#[rustc_clean(cfg="cfail2", except="fn_sig,optimized_mir,typeck")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck")]
#[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck,associated_item")]
#[rustc_clean(cfg="cfail6")]
pub fn change_impl_self_type(&self) { }
}
Expand All @@ -747,7 +747,7 @@ impl<T> Bar<T> {
impl<T: 'static> Bar<T> {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(cfg="cfail5", except="associated_item")]
#[rustc_clean(cfg="cfail6")]
pub fn add_lifetime_bound_to_impl_parameter(&self) { }
}
Expand All @@ -768,7 +768,7 @@ impl<T> Bar<T> {
impl<T: Clone> Bar<T> {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(cfg="cfail5", except="associated_item")]
#[rustc_clean(cfg="cfail6")]
pub fn add_trait_bound_to_impl_parameter(&self) { }
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/incremental/hashes/trait_defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ trait TraitAddUnsafeModifier {
trait TraitAddUnsafeModifier {
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail5")]
#[rustc_clean(except="hir_owner,fn_sig,associated_item", cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
unsafe fn method();
}
Expand All @@ -430,7 +430,7 @@ trait TraitAddExternModifier {
trait TraitAddExternModifier {
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail5")]
#[rustc_clean(except="hir_owner,fn_sig,associated_item", cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
extern "C" fn method();
}
Expand Down Expand Up @@ -850,7 +850,7 @@ trait TraitAddInitializerToAssociatedConstant {

#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(except="associated_item", cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
fn method();
}
Expand Down
9 changes: 5 additions & 4 deletions src/test/incremental/hashes/trait_impls.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore-tidy-linelength
// This test case tests the incremental compilation hash (ICH) implementation
// for let expressions.

Expand Down Expand Up @@ -470,7 +471,7 @@ impl<TTT> AddTypeParameterToImpl<TTT> for Bar<TTT> {
)]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(
except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir",
except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir,associated_item",
cfg="cfail5",
)]
#[rustc_clean(cfg="cfail6")]
Expand All @@ -497,7 +498,7 @@ impl ChangeSelfTypeOfImpl for u32 {
impl ChangeSelfTypeOfImpl for u64 {
#[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail5")]
#[rustc_clean(except="fn_sig,typeck,optimized_mir,associated_item", cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
fn id(self) -> Self { self }
}
Expand All @@ -522,7 +523,7 @@ impl<T> AddLifetimeBoundToImplParameter for T {
impl<T: 'static> AddLifetimeBoundToImplParameter for T {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(except="associated_item", cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
fn id(self) -> Self { self }
}
Expand All @@ -547,7 +548,7 @@ impl<T> AddTraitBoundToImplParameter for T {
impl<T: Clone> AddTraitBoundToImplParameter for T {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(except="associated_item", cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
fn id(self) -> Self { self }
}
Expand Down

0 comments on commit 3803582

Please sign in to comment.