Skip to content

Commit b9c97e9

Browse files
committed
Drop ensure for privacy_access_levels. Add some comments.
1 parent 3f04433 commit b9c97e9

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
@@ -783,6 +783,8 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
783783
sess.time("looking_for_derive_registrar", || proc_macro_decls::find(tcx));
784784
},
785785
{
786+
// This is used by the loop below.
787+
// Make sure it is complete before we fan out.
786788
tcx.get_lang_items(LOCAL_CRATE);
787789

788790
let _timer = tcx.sess.timer("misc_module_passes");
@@ -802,6 +804,8 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
802804
tcx.visible_parent_map(LOCAL_CRATE);
803805
},
804806
{
807+
// This is used by `check_mod_unstable_api_usage`.
808+
// Make sure it is complete before we fan out.
805809
tcx.stability_index(LOCAL_CRATE);
806810

807811
let _timer = tcx.sess.timer("check_unstable_api_usage");
@@ -852,7 +856,8 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
852856
sess.time("misc_checking_3", || {
853857
parallel!(
854858
{
855-
tcx.ensure().privacy_access_levels(LOCAL_CRATE);
859+
// Prefetch this as it is used later by lint checking and privacy checking.
860+
tcx.privacy_access_levels(LOCAL_CRATE);
856861
},
857862
{
858863
sess.time("MIR_borrow_checking", || {

0 commit comments

Comments
 (0)