3
3
//! This module provides facilities to record item correspondence of various kinds, as well as a
4
4
//! map used to temporarily match up unsorted item sequences' elements by name.
5
5
6
- use rustc_ast:: ast:: Name ;
7
6
use rustc_hir:: {
8
7
def:: Res ,
9
8
def_id:: { CrateNum , DefId } ,
@@ -13,6 +12,7 @@ use rustc_middle::{
13
12
hir:: exports:: Export ,
14
13
ty:: { AssocKind , GenericParamDef , GenericParamDefKind } ,
15
14
} ;
15
+ use rustc_span:: symbol:: Symbol ;
16
16
use std:: collections:: { BTreeSet , HashMap , HashSet , VecDeque } ;
17
17
use std:: hash:: { Hash , Hasher } ;
18
18
@@ -24,7 +24,7 @@ pub struct InherentEntry {
24
24
/// The kind of the item.
25
25
pub kind : AssocKind ,
26
26
/// The item's name.
27
- pub name : Name ,
27
+ pub name : Symbol ,
28
28
}
29
29
30
30
impl Eq for InherentEntry { }
@@ -38,7 +38,7 @@ fn assert_inherent_entry_members_impl_eq() {
38
38
// FIXME derive Eq again once AssocKind impls Eq again.
39
39
// assert_impl_eq::<AssocKind>();
40
40
41
- assert_impl_eq :: < Name > ( ) ;
41
+ assert_impl_eq :: < Symbol > ( ) ;
42
42
}
43
43
44
44
#[ allow( clippy:: derive_hash_xor_eq) ]
@@ -210,7 +210,7 @@ impl IdMapping {
210
210
& mut self ,
211
211
parent_def_id : DefId ,
212
212
kind : AssocKind ,
213
- name : Name ,
213
+ name : Symbol ,
214
214
impl_def_id : DefId ,
215
215
item_def_id : DefId ,
216
216
) {
@@ -340,11 +340,11 @@ type OptionalExport = Option<Export<HirId>>;
340
340
#[ cfg_attr( feature = "cargo-clippy" , allow( clippy:: module_name_repetitions) ) ]
341
341
pub struct NameMapping {
342
342
/// The exports in the type namespace.
343
- type_map : HashMap < Name , ( OptionalExport , OptionalExport ) > ,
343
+ type_map : HashMap < Symbol , ( OptionalExport , OptionalExport ) > ,
344
344
/// The exports in the value namespace.
345
- value_map : HashMap < Name , ( OptionalExport , OptionalExport ) > ,
345
+ value_map : HashMap < Symbol , ( OptionalExport , OptionalExport ) > ,
346
346
/// The exports in the macro namespace.
347
- macro_map : HashMap < Name , ( OptionalExport , OptionalExport ) > ,
347
+ macro_map : HashMap < Symbol , ( OptionalExport , OptionalExport ) > ,
348
348
}
349
349
350
350
impl NameMapping {
0 commit comments