File tree 1 file changed +9
-2
lines changed
compiler/rustc_metadata/src/rmeta
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1613,12 +1613,19 @@ impl EncodeContext<'a, 'tcx> {
1613
1613
let tcx = self . tcx ;
1614
1614
let hir = tcx. hir ( ) ;
1615
1615
1616
- record ! ( self . tables. span[ LOCAL_CRATE . as_def_id( ) ] <- hir. span( hir:: CRATE_HIR_ID ) ) ;
1617
-
1618
1616
let proc_macro_decls_static = tcx. proc_macro_decls_static ( LOCAL_CRATE ) . unwrap ( ) . index ;
1619
1617
let stability = tcx. lookup_stability ( DefId :: local ( CRATE_DEF_INDEX ) ) . copied ( ) ;
1620
1618
let macros = self . lazy ( hir. krate ( ) . proc_macros . iter ( ) . map ( |p| p. owner . local_def_index ) ) ;
1621
1619
1620
+ record ! ( self . tables. def_kind[ LOCAL_CRATE . as_def_id( ) ] <- DefKind :: Mod ) ;
1621
+ record ! ( self . tables. span[ LOCAL_CRATE . as_def_id( ) ] <- tcx. def_span( LOCAL_CRATE . as_def_id( ) ) ) ;
1622
+ record ! ( self . tables. attributes[ LOCAL_CRATE . as_def_id( ) ] <- tcx. get_attrs( LOCAL_CRATE . as_def_id( ) ) ) ;
1623
+ record ! ( self . tables. visibility[ LOCAL_CRATE . as_def_id( ) ] <- tcx. visibility( LOCAL_CRATE . as_def_id( ) ) ) ;
1624
+ if let Some ( stability) = stability {
1625
+ record ! ( self . tables. stability[ LOCAL_CRATE . as_def_id( ) ] <- stability) ;
1626
+ }
1627
+ self . encode_deprecation ( LOCAL_CRATE . as_def_id ( ) ) ;
1628
+
1622
1629
// Normally, this information is encoded when we walk the items
1623
1630
// defined in this crate. However, we skip doing that for proc-macro crates,
1624
1631
// so we manually encode just the information that we need
You can’t perform that action at this time.
0 commit comments