33//! This module provides facilities to record item correspondence of various kinds, as well as a
44//! map used to temporarily match up unsorted item sequences' elements by name.
55
6- use rustc_ast:: ast:: Name ;
76use rustc_hir:: {
87 def:: Res ,
98 def_id:: { CrateNum , DefId } ,
@@ -13,6 +12,7 @@ use rustc_middle::{
1312 hir:: exports:: Export ,
1413 ty:: { AssocKind , GenericParamDef , GenericParamDefKind } ,
1514} ;
15+ use rustc_span:: symbol:: Symbol ;
1616use std:: collections:: { BTreeSet , HashMap , HashSet , VecDeque } ;
1717use std:: hash:: { Hash , Hasher } ;
1818
@@ -24,7 +24,7 @@ pub struct InherentEntry {
2424 /// The kind of the item.
2525 pub kind : AssocKind ,
2626 /// The item's name.
27- pub name : Name ,
27+ pub name : Symbol ,
2828}
2929
3030impl Eq for InherentEntry { }
@@ -38,7 +38,7 @@ fn assert_inherent_entry_members_impl_eq() {
3838 // FIXME derive Eq again once AssocKind impls Eq again.
3939 // assert_impl_eq::<AssocKind>();
4040
41- assert_impl_eq :: < Name > ( ) ;
41+ assert_impl_eq :: < Symbol > ( ) ;
4242}
4343
4444#[ allow( clippy:: derive_hash_xor_eq) ]
@@ -210,7 +210,7 @@ impl IdMapping {
210210 & mut self ,
211211 parent_def_id : DefId ,
212212 kind : AssocKind ,
213- name : Name ,
213+ name : Symbol ,
214214 impl_def_id : DefId ,
215215 item_def_id : DefId ,
216216 ) {
@@ -340,11 +340,11 @@ type OptionalExport = Option<Export<HirId>>;
340340#[ cfg_attr( feature = "cargo-clippy" , allow( clippy:: module_name_repetitions) ) ]
341341pub struct NameMapping {
342342 /// The exports in the type namespace.
343- type_map : HashMap < Name , ( OptionalExport , OptionalExport ) > ,
343+ type_map : HashMap < Symbol , ( OptionalExport , OptionalExport ) > ,
344344 /// The exports in the value namespace.
345- value_map : HashMap < Name , ( OptionalExport , OptionalExport ) > ,
345+ value_map : HashMap < Symbol , ( OptionalExport , OptionalExport ) > ,
346346 /// The exports in the macro namespace.
347- macro_map : HashMap < Name , ( OptionalExport , OptionalExport ) > ,
347+ macro_map : HashMap < Symbol , ( OptionalExport , OptionalExport ) > ,
348348}
349349
350350impl NameMapping {
0 commit comments