@@ -76,7 +76,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
76
76
& Spanned { span : rustc_span:: DUMMY_SP , node : hir:: VisibilityKind :: Public } ,
77
77
hir:: CRATE_HIR_ID ,
78
78
& krate. item . module ,
79
- Some ( self . cx . tcx . crate_name ) ,
79
+ self . cx . tcx . crate_name ,
80
80
) ;
81
81
top_level_module. is_crate = true ;
82
82
// Attach the crate's exported macros to the top-level module.
@@ -114,7 +114,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
114
114
_ => continue ' exported_macros,
115
115
} ;
116
116
// 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) {
118
118
Some ( child_mod) => cur_mod = & mut * child_mod,
119
119
None => continue ' exported_macros,
120
120
}
@@ -133,7 +133,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
133
133
vis : & ' tcx hir:: Visibility < ' _ > ,
134
134
id : hir:: HirId ,
135
135
m : & ' tcx hir:: Mod < ' tcx > ,
136
- name : Option < Symbol > ,
136
+ name : Symbol ,
137
137
) -> Module < ' tcx > {
138
138
let mut om = Module :: new ( name) ;
139
139
om. where_outer = span;
@@ -312,13 +312,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
312
312
om. items . push ( ( item, renamed) )
313
313
}
314
314
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) ) ;
322
316
}
323
317
hir:: ItemKind :: Fn ( ..)
324
318
| hir:: ItemKind :: ExternCrate ( ..)
0 commit comments