File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
compiler/rustc_metadata/src/rmeta Expand file tree Collapse file tree 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> {
16131613 let tcx = self . tcx ;
16141614 let hir = tcx. hir ( ) ;
16151615
1616- record ! ( self . tables. span[ LOCAL_CRATE . as_def_id( ) ] <- hir. span( hir:: CRATE_HIR_ID ) ) ;
1617-
16181616 let proc_macro_decls_static = tcx. proc_macro_decls_static ( LOCAL_CRATE ) . unwrap ( ) . index ;
16191617 let stability = tcx. lookup_stability ( DefId :: local ( CRATE_DEF_INDEX ) ) . copied ( ) ;
16201618 let macros = self . lazy ( hir. krate ( ) . proc_macros . iter ( ) . map ( |p| p. owner . local_def_index ) ) ;
16211619
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+
16221629 // Normally, this information is encoded when we walk the items
16231630 // defined in this crate. However, we skip doing that for proc-macro crates,
16241631 // so we manually encode just the information that we need
You can’t perform that action at this time.
0 commit comments