@@ -241,7 +241,7 @@ fn type_param_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
241
241
let param_owner_def_id = tcx. hir . local_def_id ( param_owner) ;
242
242
let generics = tcx. generics_of ( param_owner_def_id) ;
243
243
let index = generics. type_param_to_index [ & def_id] ;
244
- let ty = tcx. mk_param ( index, tcx. hir . ty_param_name ( param_id) ) ;
244
+ let ty = tcx. mk_param ( index, tcx. hir . ty_param_name ( param_id) . as_str ( ) ) ;
245
245
246
246
// Don't look for bounds where the type parameter isn't in scope.
247
247
let parent = if item_def_id == param_owner_def_id {
@@ -839,7 +839,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
839
839
840
840
opt_self = Some ( ty:: TypeParameterDef {
841
841
index : 0 ,
842
- name : keywords:: SelfType . name ( ) ,
842
+ name : keywords:: SelfType . name ( ) . as_str ( ) ,
843
843
def_id : tcx. hir . local_def_id ( param_id) ,
844
844
has_default : false ,
845
845
object_lifetime_default : rl:: Set1 :: Empty ,
@@ -915,7 +915,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
915
915
916
916
ty:: TypeParameterDef {
917
917
index : type_start + i as u32 ,
918
- name : p. name ,
918
+ name : p. name . as_str ( ) ,
919
919
def_id : tcx. hir . local_def_id ( p. id ) ,
920
920
has_default : p. default . is_some ( ) ,
921
921
object_lifetime_default :
@@ -934,7 +934,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
934
934
// add a dummy parameter for the closure kind
935
935
types. push ( ty:: TypeParameterDef {
936
936
index : type_start,
937
- name : Symbol :: intern ( "<closure_kind>" ) ,
937
+ name : Symbol :: intern ( "<closure_kind>" ) . as_str ( ) ,
938
938
def_id,
939
939
has_default : false ,
940
940
object_lifetime_default : rl:: Set1 :: Empty ,
@@ -945,7 +945,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
945
945
// add a dummy parameter for the closure signature
946
946
types. push ( ty:: TypeParameterDef {
947
947
index : type_start + 1 ,
948
- name : Symbol :: intern ( "<closure_signature>" ) ,
948
+ name : Symbol :: intern ( "<closure_signature>" ) . as_str ( ) ,
949
949
def_id,
950
950
has_default : false ,
951
951
object_lifetime_default : rl:: Set1 :: Empty ,
@@ -956,7 +956,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
956
956
tcx. with_freevars ( node_id, |fv| {
957
957
types. extend ( fv. iter ( ) . zip ( 2 ..) . map ( |( _, i) | ty:: TypeParameterDef {
958
958
index : type_start + i,
959
- name : Symbol :: intern ( "<upvar>" ) ,
959
+ name : Symbol :: intern ( "<upvar>" ) . as_str ( ) ,
960
960
def_id,
961
961
has_default : false ,
962
962
object_lifetime_default : rl:: Set1 :: Empty ,
@@ -1436,7 +1436,7 @@ fn explicit_predicates_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
1436
1436
// Collect the predicates that were written inline by the user on each
1437
1437
// type parameter (e.g., `<T:Foo>`).
1438
1438
for param in ast_generics. ty_params ( ) {
1439
- let param_ty = ty:: ParamTy :: new ( index, param. name ) . to_ty ( tcx) ;
1439
+ let param_ty = ty:: ParamTy :: new ( index, param. name . as_str ( ) ) . to_ty ( tcx) ;
1440
1440
index += 1 ;
1441
1441
1442
1442
let bounds = compute_bounds ( & icx,
0 commit comments