@@ -379,7 +379,7 @@ impl Clean<Lifetime> for hir::Lifetime {
379
379
}
380
380
_ => { }
381
381
}
382
- Lifetime ( self . name . ident ( ) . to_string ( ) )
382
+ Lifetime ( self . name . ident ( ) . name )
383
383
}
384
384
}
385
385
@@ -397,9 +397,9 @@ impl Clean<Lifetime> for hir::GenericParam<'_> {
397
397
for bound in bounds {
398
398
s. push_str ( & format ! ( " + {}" , bound. name. ident( ) ) ) ;
399
399
}
400
- Lifetime ( s )
400
+ Lifetime ( Symbol :: intern ( & s ) )
401
401
} else {
402
- Lifetime ( self . name . ident ( ) . to_string ( ) )
402
+ Lifetime ( self . name . ident ( ) . name )
403
403
}
404
404
}
405
405
_ => panic ! ( ) ,
@@ -423,16 +423,16 @@ impl Clean<Constant> for hir::ConstArg {
423
423
424
424
impl Clean < Lifetime > for ty:: GenericParamDef {
425
425
fn clean ( & self , _cx : & DocContext < ' _ > ) -> Lifetime {
426
- Lifetime ( self . name . to_string ( ) )
426
+ Lifetime ( self . name )
427
427
}
428
428
}
429
429
430
430
impl Clean < Option < Lifetime > > for ty:: RegionKind {
431
- fn clean ( & self , cx : & DocContext < ' _ > ) -> Option < Lifetime > {
431
+ fn clean ( & self , _cx : & DocContext < ' _ > ) -> Option < Lifetime > {
432
432
match * self {
433
433
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 ) ) ,
436
436
437
437
ty:: ReLateBound ( ..)
438
438
| ty:: ReFree ( ..)
@@ -897,7 +897,7 @@ fn clean_fn_or_proc_macro(
897
897
}
898
898
}
899
899
}
900
- ProcMacroItem ( ProcMacro { kind, helpers : helpers . clean ( cx ) } )
900
+ ProcMacroItem ( ProcMacro { kind, helpers } )
901
901
}
902
902
None => {
903
903
let mut func = ( sig, generics, body_id) . clean ( cx) ;
@@ -1914,7 +1914,7 @@ impl Clean<GenericArgs> for hir::GenericArgs<'_> {
1914
1914
1915
1915
impl Clean < PathSegment > for hir:: PathSegment < ' _ > {
1916
1916
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) }
1918
1918
}
1919
1919
}
1920
1920
@@ -2132,7 +2132,6 @@ fn clean_extern_crate(
2132
2132
return items;
2133
2133
}
2134
2134
}
2135
- let path = orig_name. map ( |x| x. to_string ( ) ) ;
2136
2135
// FIXME: using `from_def_id_and_kind` breaks `rustdoc/masked` for some reason
2137
2136
vec ! [ Item {
2138
2137
name: None ,
@@ -2143,7 +2142,7 @@ fn clean_extern_crate(
2143
2142
stability: None ,
2144
2143
const_stability: None ,
2145
2144
deprecation: None ,
2146
- kind: ExternCrateItem ( name. clean ( cx ) , path ) ,
2145
+ kind: ExternCrateItem ( name, orig_name ) ,
2147
2146
} ]
2148
2147
}
2149
2148
@@ -2215,15 +2214,15 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
2215
2214
const_stability : None ,
2216
2215
deprecation : None ,
2217
2216
kind : ImportItem ( Import :: new_simple (
2218
- self . name . clean ( cx ) ,
2217
+ self . name ,
2219
2218
resolve_use_source ( cx, path) ,
2220
2219
false ,
2221
2220
) ) ,
2222
2221
} ) ;
2223
2222
return items;
2224
2223
}
2225
2224
}
2226
- Import :: new_simple ( name. clean ( cx ) , resolve_use_source ( cx, path) , true )
2225
+ Import :: new_simple ( name, resolve_use_source ( cx, path) , true )
2227
2226
} ;
2228
2227
2229
2228
vec ! [ Item {
0 commit comments