Skip to content

Commit 3803582

Browse files
committed
Hash full Ident (including Span) in AssocItem
1 parent 124555a commit 3803582

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

compiler/rustc_middle/src/ty/assoc.rs

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

src/test/incremental/hashes/inherent_impls.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl Foo {
210210
impl Foo {
211211
#[rustc_clean(cfg="cfail2")]
212212
#[rustc_clean(cfg="cfail3")]
213-
#[rustc_clean(cfg="cfail5")]
213+
#[rustc_clean(cfg="cfail5", except="associated_item")]
214214
#[rustc_clean(cfg="cfail6")]
215215
pub fn add_method_to_impl1(&self) { }
216216

@@ -704,7 +704,7 @@ impl<T> Bar<T> {
704704
#[rustc_clean(cfg="cfail3")]
705705
#[rustc_clean(
706706
cfg="cfail5",
707-
except="generics_of,fn_sig,typeck,type_of,optimized_mir"
707+
except="generics_of,fn_sig,typeck,type_of,optimized_mir,associated_item"
708708
)]
709709
#[rustc_clean(cfg="cfail6")]
710710
pub fn add_type_parameter_to_impl(&self) { }
@@ -726,7 +726,7 @@ impl Bar<u32> {
726726
impl Bar<u64> {
727727
#[rustc_clean(cfg="cfail2", except="fn_sig,optimized_mir,typeck")]
728728
#[rustc_clean(cfg="cfail3")]
729-
#[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck")]
729+
#[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck,associated_item")]
730730
#[rustc_clean(cfg="cfail6")]
731731
pub fn change_impl_self_type(&self) { }
732732
}
@@ -747,7 +747,7 @@ impl<T> Bar<T> {
747747
impl<T: 'static> Bar<T> {
748748
#[rustc_clean(cfg="cfail2")]
749749
#[rustc_clean(cfg="cfail3")]
750-
#[rustc_clean(cfg="cfail5")]
750+
#[rustc_clean(cfg="cfail5", except="associated_item")]
751751
#[rustc_clean(cfg="cfail6")]
752752
pub fn add_lifetime_bound_to_impl_parameter(&self) { }
753753
}
@@ -768,7 +768,7 @@ impl<T> Bar<T> {
768768
impl<T: Clone> Bar<T> {
769769
#[rustc_clean(cfg="cfail2")]
770770
#[rustc_clean(cfg="cfail3")]
771-
#[rustc_clean(cfg="cfail5")]
771+
#[rustc_clean(cfg="cfail5", except="associated_item")]
772772
#[rustc_clean(cfg="cfail6")]
773773
pub fn add_trait_bound_to_impl_parameter(&self) { }
774774
}

src/test/incremental/hashes/trait_defs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ trait TraitAddUnsafeModifier {
405405
trait TraitAddUnsafeModifier {
406406
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
407407
#[rustc_clean(cfg="cfail3")]
408-
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail5")]
408+
#[rustc_clean(except="hir_owner,fn_sig,associated_item", cfg="cfail5")]
409409
#[rustc_clean(cfg="cfail6")]
410410
unsafe fn method();
411411
}
@@ -430,7 +430,7 @@ trait TraitAddExternModifier {
430430
trait TraitAddExternModifier {
431431
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
432432
#[rustc_clean(cfg="cfail3")]
433-
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail5")]
433+
#[rustc_clean(except="hir_owner,fn_sig,associated_item", cfg="cfail5")]
434434
#[rustc_clean(cfg="cfail6")]
435435
extern "C" fn method();
436436
}
@@ -850,7 +850,7 @@ trait TraitAddInitializerToAssociatedConstant {
850850

851851
#[rustc_clean(cfg="cfail2")]
852852
#[rustc_clean(cfg="cfail3")]
853-
#[rustc_clean(cfg="cfail5")]
853+
#[rustc_clean(except="associated_item", cfg="cfail5")]
854854
#[rustc_clean(cfg="cfail6")]
855855
fn method();
856856
}

src/test/incremental/hashes/trait_impls.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// ignore-tidy-linelength
12
// This test case tests the incremental compilation hash (ICH) implementation
23
// for let expressions.
34

@@ -470,7 +471,7 @@ impl<TTT> AddTypeParameterToImpl<TTT> for Bar<TTT> {
470471
)]
471472
#[rustc_clean(cfg="cfail3")]
472473
#[rustc_clean(
473-
except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir",
474+
except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir,associated_item",
474475
cfg="cfail5",
475476
)]
476477
#[rustc_clean(cfg="cfail6")]
@@ -497,7 +498,7 @@ impl ChangeSelfTypeOfImpl for u32 {
497498
impl ChangeSelfTypeOfImpl for u64 {
498499
#[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail2")]
499500
#[rustc_clean(cfg="cfail3")]
500-
#[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail5")]
501+
#[rustc_clean(except="fn_sig,typeck,optimized_mir,associated_item", cfg="cfail5")]
501502
#[rustc_clean(cfg="cfail6")]
502503
fn id(self) -> Self { self }
503504
}
@@ -522,7 +523,7 @@ impl<T> AddLifetimeBoundToImplParameter for T {
522523
impl<T: 'static> AddLifetimeBoundToImplParameter for T {
523524
#[rustc_clean(cfg="cfail2")]
524525
#[rustc_clean(cfg="cfail3")]
525-
#[rustc_clean(cfg="cfail5")]
526+
#[rustc_clean(except="associated_item", cfg="cfail5")]
526527
#[rustc_clean(cfg="cfail6")]
527528
fn id(self) -> Self { self }
528529
}
@@ -547,7 +548,7 @@ impl<T> AddTraitBoundToImplParameter for T {
547548
impl<T: Clone> AddTraitBoundToImplParameter for T {
548549
#[rustc_clean(cfg="cfail2")]
549550
#[rustc_clean(cfg="cfail3")]
550-
#[rustc_clean(cfg="cfail5")]
551+
#[rustc_clean(except="associated_item", cfg="cfail5")]
551552
#[rustc_clean(cfg="cfail6")]
552553
fn id(self) -> Self { self }
553554
}

0 commit comments

Comments
 (0)