Skip to content

Hash full Ident (including Span) in AssocItem #92837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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