@@ -379,7 +379,7 @@ impl Clean<Lifetime> for hir::Lifetime {
379379 }
380380 _ => { }
381381 }
382- Lifetime ( self . name . ident ( ) . to_string ( ) )
382+ Lifetime ( self . name . ident ( ) . name )
383383 }
384384}
385385
@@ -397,9 +397,9 @@ impl Clean<Lifetime> for hir::GenericParam<'_> {
397397 for bound in bounds {
398398 s. push_str ( & format ! ( " + {}" , bound. name. ident( ) ) ) ;
399399 }
400- Lifetime ( s )
400+ Lifetime ( Symbol :: intern ( & s ) )
401401 } else {
402- Lifetime ( self . name . ident ( ) . to_string ( ) )
402+ Lifetime ( self . name . ident ( ) . name )
403403 }
404404 }
405405 _ => panic ! ( ) ,
@@ -423,16 +423,16 @@ impl Clean<Constant> for hir::ConstArg {
423423
424424impl Clean < Lifetime > for ty:: GenericParamDef {
425425 fn clean ( & self , _cx : & DocContext < ' _ > ) -> Lifetime {
426- Lifetime ( self . name . to_string ( ) )
426+ Lifetime ( self . name )
427427 }
428428}
429429
430430impl Clean < Option < Lifetime > > for ty:: RegionKind {
431- fn clean ( & self , cx : & DocContext < ' _ > ) -> Option < Lifetime > {
431+ fn clean ( & self , _cx : & DocContext < ' _ > ) -> Option < Lifetime > {
432432 match * self {
433433 ty:: ReStatic => Some ( Lifetime :: statik ( ) ) ,
434- ty:: ReLateBound ( _, ty:: BrNamed ( _, name) ) => Some ( Lifetime ( name. to_string ( ) ) ) ,
435- ty:: ReEarlyBound ( ref data) => Some ( Lifetime ( data. name . clean ( cx ) ) ) ,
434+ ty:: ReLateBound ( _, ty:: BrNamed ( _, name) ) => Some ( Lifetime ( name) ) ,
435+ ty:: ReEarlyBound ( ref data) => Some ( Lifetime ( data. name ) ) ,
436436
437437 ty:: ReLateBound ( ..)
438438 | ty:: ReFree ( ..)
@@ -897,7 +897,7 @@ fn clean_fn_or_proc_macro(
897897 }
898898 }
899899 }
900- ProcMacroItem ( ProcMacro { kind, helpers : helpers . clean ( cx ) } )
900+ ProcMacroItem ( ProcMacro { kind, helpers } )
901901 }
902902 None => {
903903 let mut func = ( sig, generics, body_id) . clean ( cx) ;
@@ -1914,7 +1914,7 @@ impl Clean<GenericArgs> for hir::GenericArgs<'_> {
19141914
19151915impl Clean < PathSegment > for hir:: PathSegment < ' _ > {
19161916 fn clean ( & self , cx : & DocContext < ' _ > ) -> PathSegment {
1917- PathSegment { name : self . ident . name . clean ( cx ) , args : self . generic_args ( ) . clean ( cx) }
1917+ PathSegment { name : self . ident . name , args : self . generic_args ( ) . clean ( cx) }
19181918 }
19191919}
19201920
@@ -2132,7 +2132,6 @@ fn clean_extern_crate(
21322132 return items;
21332133 }
21342134 }
2135- let path = orig_name. map ( |x| x. to_string ( ) ) ;
21362135 // FIXME: using `from_def_id_and_kind` breaks `rustdoc/masked` for some reason
21372136 vec ! [ Item {
21382137 name: None ,
@@ -2143,7 +2142,7 @@ fn clean_extern_crate(
21432142 stability: None ,
21442143 const_stability: None ,
21452144 deprecation: None ,
2146- kind: ExternCrateItem ( name. clean ( cx ) , path ) ,
2145+ kind: ExternCrateItem ( name, orig_name ) ,
21472146 } ]
21482147}
21492148
@@ -2215,15 +2214,15 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
22152214 const_stability : None ,
22162215 deprecation : None ,
22172216 kind : ImportItem ( Import :: new_simple (
2218- self . name . clean ( cx ) ,
2217+ self . name ,
22192218 resolve_use_source ( cx, path) ,
22202219 false ,
22212220 ) ) ,
22222221 } ) ;
22232222 return items;
22242223 }
22252224 }
2226- Import :: new_simple ( name. clean ( cx ) , resolve_use_source ( cx, path) , true )
2225+ Import :: new_simple ( name, resolve_use_source ( cx, path) , true )
22272226 } ;
22282227
22292228 vec ! [ Item {
0 commit comments