File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -858,6 +858,10 @@ impl<'a> CrateLoader<'a> {
858
858
} ) ;
859
859
}
860
860
861
+ pub fn loaded_crates ( & self ) -> & FxHashSet < Symbol > {
862
+ self . loaded_crates . as_ref ( ) . unwrap ( )
863
+ }
864
+
861
865
pub fn take_loaded_crates ( & mut self ) -> FxHashSet < Symbol > {
862
866
self . loaded_crates . take ( ) . unwrap ( )
863
867
}
Original file line number Diff line number Diff line change @@ -1276,7 +1276,6 @@ impl<'a> Resolver<'a> {
1276
1276
. iter ( )
1277
1277
. map ( |( ident, entry) | ( ident. name , entry. introduced_by_item ) )
1278
1278
. collect ( ) ,
1279
- // The used crates are finalized at this point
1280
1279
used_crates : Some ( used_crates) ,
1281
1280
}
1282
1281
}
@@ -1296,13 +1295,7 @@ impl<'a> Resolver<'a> {
1296
1295
. iter ( )
1297
1296
. map ( |( ident, entry) | ( ident. name , entry. introduced_by_item ) )
1298
1297
. collect ( ) ,
1299
- // The used crates are not finalized at this point - lowering the AST
1300
- // may cause us to call `Resolver.extern_prelude_get`,
1301
- // which may update the set of used crates even if a
1302
- // new crate is not loaded from disk
1303
- // We should never actually need to access this, but we set it to
1304
- // `None` so that we get an ICE if we try to unwrap it
1305
- used_crates : None ,
1298
+ used_crates : Some ( self . crate_loader . loaded_crates ( ) . clone ( ) ) ,
1306
1299
}
1307
1300
}
1308
1301
You can’t perform that action at this time.
0 commit comments