diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-25 14:13:16 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-05 09:20:28 +1100 |
| commit | 2df8e657f23cd56fe0f5f7e1a13697037a8a8487 (patch) | |
| tree | 3c84f23b5e3de5b23f4d975874a93df0f2f3fbba /compiler/rustc_codegen_llvm/src | |
| parent | 1df93fd6a7a164ebd8b7868d9382e3fb37f4642e (diff) | |
| download | rust-2df8e657f23cd56fe0f5f7e1a13697037a8a8487.tar.gz rust-2df8e657f23cd56fe0f5f7e1a13697037a8a8487.zip | |
Simplify `implied_target_features`.
Currently its argument is an iterator, but in practice it's always a singleton.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 23e8a986564..f86ac13a87a 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -360,7 +360,7 @@ pub(crate) fn target_features_cfg(sess: &Session, allow_unstable: bool) -> Vec<S #[allow(rustc::potential_query_instability)] features.extend( sess.target - .implied_target_features(std::iter::once(feature.as_str())) + .implied_target_features(feature.as_str()) .iter() .map(|s| Symbol::intern(s)), ); @@ -373,7 +373,7 @@ pub(crate) fn target_features_cfg(sess: &Session, allow_unstable: bool) -> Vec<S features.retain(|f| { if sess .target - .implied_target_features(std::iter::once(f.as_str())) + .implied_target_features(f.as_str()) .contains(&feature.as_str()) { // If `f` if implies `feature`, then `!feature` implies `!f`, so we have to @@ -681,7 +681,7 @@ pub(crate) fn global_llvm_features( for feature in sess.opts.cg.target_feature.split(',') { if let Some(feature) = feature.strip_prefix('+') { all_rust_features.extend( - UnordSet::from(sess.target.implied_target_features(std::iter::once(feature))) + UnordSet::from(sess.target.implied_target_features(feature)) .to_sorted_stable_ord() .iter() .map(|&&s| (true, s)), |
