File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,6 @@ impl Clean<Vec<Item>> for hir::Item<'_> {
304304 generics : generics. clean ( cx) ,
305305 bounds : bounds. clean ( cx) ,
306306 is_spotlight,
307- // FIXME: this is redundant with `auto`
308307 is_auto : is_auto. clean ( cx) ,
309308 } ) )
310309 }
@@ -380,16 +379,17 @@ impl Clean<Item> for hir::Crate<'_> {
380379 }
381380 } ;
382381
383- let id = hir:: CRATE_HIR_ID ;
382+ let what_rustc_thinks = Item :: from_hir_id_and_parts (
383+ hir:: CRATE_HIR_ID ,
384+ Some ( cx. tcx . crate_name ) ,
385+ ModuleItem ( Module { is_crate : true , items : items. collect ( ) } ) ,
386+ cx,
387+ ) ;
384388 Item {
385- name : Some ( cx . tcx . crate_name . clean ( cx ) ) ,
389+ name : Some ( what_rustc_thinks . name . unwrap_or_default ( ) ) ,
386390 attrs,
387391 source : span. clean ( cx) ,
388- visibility : Visibility :: Public ,
389- stability : cx. stability ( id) ,
390- deprecation : cx. deprecation ( id) . clean ( cx) ,
391- def_id : cx. tcx . hir ( ) . local_def_id ( id) . to_def_id ( ) ,
392- kind : ModuleItem ( Module { is_crate : true , items : items. collect ( ) } ) ,
392+ ..what_rustc_thinks
393393 }
394394 }
395395}
You can’t perform that action at this time.
0 commit comments