about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2020-03-27 20:26:20 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2020-04-28 11:34:17 +0200
commite56c4004326cb83ec433788fa8f2fc6cd4dd391a (patch)
tree8e2fc51716e08c8b7e00182d681da3f63bee4ce5 /src/librustc_codegen_llvm
parentbd42ef6e4fb5c62c2c74bddb4dfb98603d12c20b (diff)
Use the query system to allocate.
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/attributes.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs
index ba286e5f40d..93577d64157 100644
--- a/src/librustc_codegen_llvm/attributes.rs
+++ b/src/librustc_codegen_llvm/attributes.rs
@@ -347,15 +347,12 @@ pub fn provide(providers: &mut Providers<'_>) {
         if tcx.sess.opts.actually_rustdoc {
             // rustdoc needs to be able to document functions that use all the features, so
             // whitelist them all
-            tcx.arena
-                .alloc(llvm_util::all_known_features().map(|(a, b)| (a.to_string(), b)).collect())
+            llvm_util::all_known_features().map(|(a, b)| (a.to_string(), b)).collect()
         } else {
-            tcx.arena.alloc(
-                llvm_util::target_feature_whitelist(tcx.sess)
-                    .iter()
-                    .map(|&(a, b)| (a.to_string(), b))
-                    .collect(),
-            )
+            llvm_util::target_feature_whitelist(tcx.sess)
+                .iter()
+                .map(|&(a, b)| (a.to_string(), b))
+                .collect()
         }
     };
 
@@ -387,7 +384,7 @@ pub fn provide_extern(providers: &mut Providers<'_>) {
             }));
         }
 
-        tcx.arena.alloc(ret)
+        ret
     };
 }