Cache foreign_modules query
This commit is contained in:
parent
9f6c670c4b
commit
69dc98161a
7 changed files with 20 additions and 16 deletions
|
@ -861,7 +861,7 @@ pub fn provide_both(providers: &mut Providers) {
|
|||
providers.dllimport_foreign_items = |tcx, krate| {
|
||||
let module_map = tcx.foreign_modules(krate);
|
||||
let module_map =
|
||||
module_map.iter().map(|lib| (lib.def_id, lib)).collect::<FxHashMap<_, _>>();
|
||||
module_map.iter().map(|(def_id, lib)| (def_id, lib)).collect::<FxHashMap<_, _>>();
|
||||
|
||||
let dllimports = tcx
|
||||
.native_libraries(krate)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue