@@ -10,7 +10,7 @@ use rustc_hir::Node;
1010use rustc_middle:: middle:: privacy:: AccessLevel ;
1111use rustc_middle:: ty:: TyCtxt ;
1212use rustc_span:: source_map:: Spanned ;
13- use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
13+ use rustc_span:: symbol:: { kw, sym, Symbol } ;
1414use rustc_span:: { self , Span } ;
1515
1616use std:: mem;
@@ -116,7 +116,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
116116 & mut self ,
117117 id : hir:: HirId ,
118118 res : Res ,
119- renamed : Option < Ident > ,
119+ renamed : Option < Symbol > ,
120120 glob : bool ,
121121 om : & mut Module < ' tcx > ,
122122 please_inline : bool ,
@@ -226,11 +226,11 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
226226 fn visit_item (
227227 & mut self ,
228228 item : & ' tcx hir:: Item < ' _ > ,
229- renamed : Option < Ident > ,
229+ renamed : Option < Symbol > ,
230230 om : & mut Module < ' tcx > ,
231231 ) {
232232 debug ! ( "visiting item {:?}" , item) ;
233- let ident = renamed. unwrap_or ( item. ident ) ;
233+ let name = renamed. unwrap_or ( item. ident . name ) ;
234234
235235 if item. vis . node . is_pub ( ) {
236236 let def_id = self . cx . tcx . hir ( ) . local_def_id ( item. hir_id ) ;
@@ -266,7 +266,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
266266 }
267267 _ => false ,
268268 } ) ;
269- let ident = if is_glob { None } else { Some ( ident ) } ;
269+ let ident = if is_glob { None } else { Some ( name ) } ;
270270 if self . maybe_inline_local (
271271 item. hir_id ,
272272 path. res ,
@@ -280,7 +280,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
280280 }
281281
282282 om. imports . push ( Import {
283- name : ident . name ,
283+ name,
284284 id : item. hir_id ,
285285 vis : & item. vis ,
286286 attrs : & item. attrs ,
@@ -296,7 +296,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
296296 & item. vis ,
297297 item. hir_id ,
298298 m,
299- Some ( ident . name ) ,
299+ Some ( name) ,
300300 ) ) ;
301301 }
302302 hir:: ItemKind :: Fn ( ..)
@@ -312,7 +312,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
312312 hir:: ItemKind :: Const ( ..) => {
313313 // Underscore constants do not correspond to a nameable item and
314314 // so are never useful in documentation.
315- if ident . name != kw:: Underscore {
315+ if name != kw:: Underscore {
316316 om. items . push ( ( item, renamed) ) ;
317317 }
318318 }
@@ -329,7 +329,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
329329 fn visit_foreign_item (
330330 & mut self ,
331331 item : & ' tcx hir:: ForeignItem < ' _ > ,
332- renamed : Option < Ident > ,
332+ renamed : Option < Symbol > ,
333333 om : & mut Module < ' tcx > ,
334334 ) {
335335 // If inlining we only want to include public functions.
0 commit comments