@@ -1039,7 +1039,7 @@ impl GenericBound {
10391039 fn maybe_sized ( cx : & DocContext < ' _ > ) -> GenericBound {
10401040 let did = cx. tcx . require_lang_item ( lang_items:: SizedTraitLangItem , None ) ;
10411041 let empty = cx. tcx . intern_substs ( & [ ] ) ;
1042- let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) ,
1042+ let path = external_path ( cx, cx. tcx . item_name ( did) ,
10431043 Some ( did) , false , vec ! [ ] , empty) ;
10441044 inline:: record_extern_fqn ( cx, did, TypeKind :: Trait ) ;
10451045 GenericBound :: TraitBound ( PolyTrait {
@@ -1138,13 +1138,13 @@ fn external_generic_args(
11381138
11391139// trait_did should be set to a trait's DefId if called on a TraitRef, in order to sugar
11401140// from Fn<(A, B,), C> to Fn(A, B) -> C
1141- fn external_path ( cx : & DocContext < ' _ > , name : & str , trait_did : Option < DefId > , has_self : bool ,
1141+ fn external_path ( cx : & DocContext < ' _ > , name : Symbol , trait_did : Option < DefId > , has_self : bool ,
11421142 bindings : Vec < TypeBinding > , substs : SubstsRef < ' _ > ) -> Path {
11431143 Path {
11441144 global : false ,
11451145 res : Res :: Err ,
11461146 segments : vec ! [ PathSegment {
1147- name: name. to_string( ) ,
1147+ name: name. as_str ( ) . to_string( ) ,
11481148 args: external_generic_args( cx, trait_did, has_self, bindings, substs)
11491149 } ] ,
11501150 }
@@ -1154,7 +1154,7 @@ impl<'a, 'tcx> Clean<GenericBound> for (&'a ty::TraitRef<'tcx>, Vec<TypeBinding>
11541154 fn clean ( & self , cx : & DocContext < ' _ > ) -> GenericBound {
11551155 let ( trait_ref, ref bounds) = * self ;
11561156 inline:: record_extern_fqn ( cx, trait_ref. def_id , TypeKind :: Trait ) ;
1157- let path = external_path ( cx, & cx. tcx . item_name ( trait_ref. def_id ) . as_str ( ) ,
1157+ let path = external_path ( cx, cx. tcx . item_name ( trait_ref. def_id ) ,
11581158 Some ( trait_ref. def_id ) , true , bounds. clone ( ) , trait_ref. substs ) ;
11591159
11601160 debug ! ( "ty::TraitRef\n subst: {:?}\n " , trait_ref. substs) ;
@@ -3089,8 +3089,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
30893089 AdtKind :: Enum => TypeKind :: Enum ,
30903090 } ;
30913091 inline:: record_extern_fqn ( cx, did, kind) ;
3092- let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) ,
3093- None , false , vec ! [ ] , substs) ;
3092+ let path = external_path ( cx, cx. tcx . item_name ( did) , None , false , vec ! [ ] , substs) ;
30943093 ResolvedPath {
30953094 path,
30963095 param_names : None ,
@@ -3100,7 +3099,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
31003099 }
31013100 ty:: Foreign ( did) => {
31023101 inline:: record_extern_fqn ( cx, did, TypeKind :: Foreign ) ;
3103- let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) ,
3102+ let path = external_path ( cx, cx. tcx . item_name ( did) ,
31043103 None , false , vec ! [ ] , InternalSubsts :: empty ( ) ) ;
31053104 ResolvedPath {
31063105 path : path,
@@ -3129,7 +3128,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
31293128 reg. clean ( cx) . map ( |b| param_names. push ( GenericBound :: Outlives ( b) ) ) ;
31303129 for did in dids {
31313130 let empty = cx. tcx . intern_substs ( & [ ] ) ;
3132- let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) ,
3131+ let path = external_path ( cx, cx. tcx . item_name ( did) ,
31333132 Some ( did) , false , vec ! [ ] , empty) ;
31343133 inline:: record_extern_fqn ( cx, did, TypeKind :: Trait ) ;
31353134 let bound = GenericBound :: TraitBound ( PolyTrait {
@@ -3154,7 +3153,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
31543153 } ) ;
31553154 }
31563155
3157- let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) , Some ( did) ,
3156+ let path = external_path ( cx, cx. tcx . item_name ( did) , Some ( did) ,
31583157 false , bindings, substs) ;
31593158 ResolvedPath {
31603159 path,
0 commit comments