diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-14 15:39:47 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-15 08:07:15 +1000 |
| commit | 89e93a51c81b521a9601b365e3325d31e44e9198 (patch) | |
| tree | 030e73f4e1024a7a39693fc947ce1e9c645411ae /compiler/rustc_hir_analysis/src | |
| parent | b26f3d4347ca589305a19d10c6e651b071849716 (diff) | |
| download | rust-89e93a51c81b521a9601b365e3325d31e44e9198.tar.gz rust-89e93a51c81b521a9601b365e3325d31e44e9198.zip | |
Move two methods from `AssocKind` to `AssocItem`.
Because all the other similar methods are on `AssocItem`.
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/coherence/inherent_impls_overlap.rs b/compiler/rustc_hir_analysis/src/coherence/inherent_impls_overlap.rs index dc616576c9c..cbfad1f6883 100644 --- a/compiler/rustc_hir_analysis/src/coherence/inherent_impls_overlap.rs +++ b/compiler/rustc_hir_analysis/src/coherence/inherent_impls_overlap.rs @@ -64,7 +64,7 @@ impl<'tcx> InherentOverlapChecker<'tcx> { fn compare_hygienically(&self, item1: ty::AssocItem, item2: ty::AssocItem) -> bool { // Symbols and namespace match, compare hygienically. - item1.kind.namespace() == item2.kind.namespace() + item1.namespace() == item2.namespace() && item1.ident(self.tcx).normalize_to_macros_2_0() == item2.ident(self.tcx).normalize_to_macros_2_0() } diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs index 8e62dce2191..49fd55b03a2 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs @@ -501,7 +501,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { let names: Vec<_> = tcx .associated_items(trait_def_id) .in_definition_order() - .filter(|assoc| assoc.kind.namespace() == Namespace::ValueNS) + .filter(|assoc| assoc.namespace() == Namespace::ValueNS) .map(|cand| cand.name) .collect(); if let Some(typo) = find_best_match_for_name(&names, segment.ident.name, None) { diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index 0394dd20e28..7605c6c6a42 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -1731,7 +1731,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { tcx.associated_items(*trait_def_id) .in_definition_order() .any(|i| { - i.kind.namespace() == Namespace::TypeNS + i.namespace() == Namespace::TypeNS && i.ident(tcx).normalize_to_macros_2_0() == assoc_ident && i.is_type() }) |
