@@ -1566,6 +1566,8 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
1566
1566
self . with_rib ( ValueNS , RibKind :: Module ( module) , |this| {
1567
1567
this. with_rib ( TypeNS , RibKind :: Module ( module) , |this| {
1568
1568
let ret = f ( this) ;
1569
+ // Make sure there is an entry in these maps, so metadata encoder does not need to
1570
+ // understand in which case they are populated.
1569
1571
this. r . doc_link_resolutions . entry ( def_id) . or_default ( ) ;
1570
1572
this. r . doc_link_traits_in_scope . entry ( def_id) . or_default ( ) ;
1571
1573
this. parent_scope . module = orig_module;
@@ -5250,6 +5252,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
5250
5252
BuiltinLintDiag :: UnusedLabel ,
5251
5253
) ;
5252
5254
}
5255
+ // Make sure there is an entry in these maps, so metadata encoder does not need to
5256
+ // understand in which case they are populated.
5253
5257
self . doc_link_resolutions . entry ( CRATE_DEF_ID ) . or_default ( ) ;
5254
5258
self . doc_link_traits_in_scope . entry ( CRATE_DEF_ID ) . or_default ( ) ;
5255
5259
}
0 commit comments