Skip to content

Commit c7aabbd

Browse files
committed
Drop ensure for privacy_access_levels. Add some comments.
1 parent f68672b commit c7aabbd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc_interface/passes.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,8 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
786786
sess.time("looking_for_derive_registrar", || proc_macro_decls::find(tcx));
787787
},
788788
{
789+
// This is used by the loop below.
790+
// Make sure it is complete before we fan out.
789791
tcx.get_lang_items(LOCAL_CRATE);
790792

791793
let _timer = tcx.sess.timer("misc_module_passes");
@@ -805,6 +807,8 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
805807
tcx.visible_parent_map(LOCAL_CRATE);
806808
},
807809
{
810+
// This is used by `check_mod_unstable_api_usage`.
811+
// Make sure it is complete before we fan out.
808812
tcx.stability_index(LOCAL_CRATE);
809813

810814
let _timer = tcx.sess.timer("check_unstable_api_usage");
@@ -855,7 +859,8 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
855859
sess.time("misc_checking_3", || {
856860
parallel!(
857861
{
858-
tcx.ensure().privacy_access_levels(LOCAL_CRATE);
862+
// Prefetch this as it is used later by lint checking and privacy checking.
863+
tcx.privacy_access_levels(LOCAL_CRATE);
859864
},
860865
{
861866
sess.time("MIR_borrow_checking", || {

0 commit comments

Comments
 (0)