@@ -22,7 +22,7 @@ use std::marker::PhantomData;
22
22
use std:: ops:: Range ;
23
23
use rustc_target:: spec:: abi;
24
24
use syntax:: ast:: { self , Ident } ;
25
- use syntax:: symbol:: { keywords, InternedString } ;
25
+ use syntax:: symbol:: { keywords, Symbol } ;
26
26
27
27
use serialize;
28
28
use self :: InferTy :: * ;
@@ -54,7 +54,7 @@ pub enum BoundRegion {
54
54
///
55
55
/// The `DefId` is needed to distinguish free regions in
56
56
/// the event of shadowing.
57
- BrNamed ( DefId , InternedString ) ,
57
+ BrNamed ( DefId , Symbol ) ,
58
58
59
59
/// Fresh bound identifiers created during GLB computations.
60
60
BrFresh ( u32 ) ,
@@ -1112,16 +1112,16 @@ pub type CanonicalPolyFnSig<'tcx> = Canonical<'tcx, Binder<FnSig<'tcx>>>;
1112
1112
Hash , RustcEncodable , RustcDecodable , HashStable ) ]
1113
1113
pub struct ParamTy {
1114
1114
pub index : u32 ,
1115
- pub name : InternedString ,
1115
+ pub name : Symbol ,
1116
1116
}
1117
1117
1118
1118
impl < ' a , ' gcx , ' tcx > ParamTy {
1119
- pub fn new ( index : u32 , name : InternedString ) -> ParamTy {
1119
+ pub fn new ( index : u32 , name : Symbol ) -> ParamTy {
1120
1120
ParamTy { index, name : name }
1121
1121
}
1122
1122
1123
1123
pub fn for_self ( ) -> ParamTy {
1124
- ParamTy :: new ( 0 , keywords:: SelfUpper . name ( ) . as_interned_str ( ) )
1124
+ ParamTy :: new ( 0 , keywords:: SelfUpper . name ( ) )
1125
1125
}
1126
1126
1127
1127
pub fn for_def ( def : & ty:: GenericParamDef ) -> ParamTy {
@@ -1136,19 +1136,19 @@ impl<'a, 'gcx, 'tcx> ParamTy {
1136
1136
// FIXME(#50125): Ignoring `Self` with `index != 0` might lead to weird behavior elsewhere,
1137
1137
// but this should only be possible when using `-Z continue-parse-after-error` like
1138
1138
// `compile-fail/issue-36638.rs`.
1139
- self . name == keywords:: SelfUpper . name ( ) . as_str ( ) && self . index == 0
1139
+ self . name == keywords:: SelfUpper . name ( ) && self . index == 0
1140
1140
}
1141
1141
}
1142
1142
1143
1143
#[ derive( Copy , Clone , Hash , RustcEncodable , RustcDecodable ,
1144
1144
Eq , PartialEq , Ord , PartialOrd , HashStable ) ]
1145
1145
pub struct ParamConst {
1146
1146
pub index : u32 ,
1147
- pub name : InternedString ,
1147
+ pub name : Symbol ,
1148
1148
}
1149
1149
1150
1150
impl < ' a , ' gcx , ' tcx > ParamConst {
1151
- pub fn new ( index : u32 , name : InternedString ) -> ParamConst {
1151
+ pub fn new ( index : u32 , name : Symbol ) -> ParamConst {
1152
1152
ParamConst { index, name }
1153
1153
}
1154
1154
@@ -1321,7 +1321,7 @@ impl<'tcx> serialize::UseSpecializedDecodable for Region<'tcx> {}
1321
1321
pub struct EarlyBoundRegion {
1322
1322
pub def_id : DefId ,
1323
1323
pub index : u32 ,
1324
- pub name : InternedString ,
1324
+ pub name : Symbol ,
1325
1325
}
1326
1326
1327
1327
#[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash , RustcEncodable , RustcDecodable ) ]
@@ -1385,7 +1385,7 @@ pub struct BoundTy {
1385
1385
#[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash , Debug , RustcEncodable , RustcDecodable ) ]
1386
1386
pub enum BoundTyKind {
1387
1387
Anon ,
1388
- Param ( InternedString ) ,
1388
+ Param ( Symbol ) ,
1389
1389
}
1390
1390
1391
1391
impl_stable_hash_for ! ( struct BoundTy { var, kind } ) ;
0 commit comments