Use the query system to allocate.
This commit is contained in:
parent
bd42ef6e4f
commit
e56c400432
25 changed files with 137 additions and 204 deletions
|
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue