Remove some cruft from foreign_modules refactor
This commit is contained in:
parent
69dc98161a
commit
81444b2049
@ -860,8 +860,6 @@ 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(|(def_id, lib)| (def_id, lib)).collect::<FxHashMap<_, _>>();
|
||||
|
||||
let dllimports = tcx
|
||||
.native_libraries(krate)
|
||||
|
@ -270,9 +270,10 @@ pub fn provide(providers: &mut Providers) {
|
||||
None => return false,
|
||||
};
|
||||
let map = tcx.foreign_modules(id.krate);
|
||||
let module =
|
||||
tcx.prof.generic_activity("finding_foreign_module").run(|| map.get(&fm_id));
|
||||
module.expect("failed to find foreign module").foreign_items.contains(&id)
|
||||
map.get(&fm_id)
|
||||
.expect("failed to find foreign module")
|
||||
.foreign_items
|
||||
.contains(&id)
|
||||
})
|
||||
.map(|l| l.kind)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user