about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorRyan Levick <ryan.levick@gmail.com>2020-10-27 15:01:03 +0100
committerRyan Levick <ryan.levick@gmail.com>2020-10-27 16:21:55 +0100
commit69dc98161a19580e95de1196f1523aa767fe1a5d (patch)
tree84e291c9b529fb69e4bdfe33a439dd5f67af2b93 /compiler/rustc_codegen_llvm/src
parent9f6c670c4b4273b2c7c0af07a524d4240c926bfc (diff)
downloadrust-69dc98161a19580e95de1196f1523aa767fe1a5d.tar.gz
rust-69dc98161a19580e95de1196f1523aa767fe1a5d.zip
Cache foreign_modules query
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/attributes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs
index 2075c2e1911..d4872aedd70 100644
--- a/compiler/rustc_codegen_llvm/src/attributes.rs
+++ b/compiler/rustc_codegen_llvm/src/attributes.rs
@@ -378,8 +378,8 @@ pub fn provide_both(providers: &mut Providers) {
             .collect::<FxHashMap<_, _>>();
 
         let mut ret = FxHashMap::default();
-        for lib in tcx.foreign_modules(cnum).iter() {
-            let module = def_id_to_native_lib.get(&lib.def_id).and_then(|s| s.wasm_import_module);
+        for (def_id, lib) in tcx.foreign_modules(cnum).iter() {
+            let module = def_id_to_native_lib.get(&def_id).and_then(|s| s.wasm_import_module);
             let module = match module {
                 Some(s) => s,
                 None => continue,