@@ -76,7 +76,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
7676 & Spanned { span : rustc_span:: DUMMY_SP , node : hir:: VisibilityKind :: Public } ,
7777 hir:: CRATE_HIR_ID ,
7878 & krate. item . module ,
79- Some ( self . cx . tcx . crate_name ) ,
79+ self . cx . tcx . crate_name ,
8080 ) ;
8181 top_level_module. is_crate = true ;
8282 // Attach the crate's exported macros to the top-level module.
@@ -114,7 +114,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
114114 _ => continue ' exported_macros,
115115 } ;
116116 // Descend into the child module that matches this path segment (if any).
117- match cur_mod. mods . iter_mut ( ) . find ( |child| child. name == Some ( path_segment_ty_ns) ) {
117+ match cur_mod. mods . iter_mut ( ) . find ( |child| child. name == path_segment_ty_ns) {
118118 Some ( child_mod) => cur_mod = & mut * child_mod,
119119 None => continue ' exported_macros,
120120 }
@@ -133,7 +133,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
133133 vis : & ' tcx hir:: Visibility < ' _ > ,
134134 id : hir:: HirId ,
135135 m : & ' tcx hir:: Mod < ' tcx > ,
136- name : Option < Symbol > ,
136+ name : Symbol ,
137137 ) -> Module < ' tcx > {
138138 let mut om = Module :: new ( name) ;
139139 om. where_outer = span;
@@ -312,13 +312,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
312312 om. items . push ( ( item, renamed) )
313313 }
314314 hir:: ItemKind :: Mod ( ref m) => {
315- om. mods . push ( self . visit_mod_contents (
316- item. span ,
317- & item. vis ,
318- item. hir_id ( ) ,
319- m,
320- Some ( name) ,
321- ) ) ;
315+ om. mods . push ( self . visit_mod_contents ( item. span , & item. vis , item. hir_id ( ) , m, name) ) ;
322316 }
323317 hir:: ItemKind :: Fn ( ..)
324318 | hir:: ItemKind :: ExternCrate ( ..)
0 commit comments