diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2024-12-18 05:28:59 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-18 05:28:59 +0000 |
| commit | 955ef0983112c6a10c54457cedc38eedefcdefb9 (patch) | |
| tree | 95c98c8b70f583931bf51b01a8fcf0cf854f2dc0 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | e999c48404b492659f90993e9fdd2544c675abce (diff) | |
| parent | d49845e5fe45bcffe30df0963a97b2ad859abbf8 (diff) | |
| download | rust-955ef0983112c6a10c54457cedc38eedefcdefb9.tar.gz rust-955ef0983112c6a10c54457cedc38eedefcdefb9.zip | |
Merge pull request #4097 from rust-lang/rustup-2024-12-18
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index bfec7d708cf..628c0b1c29c 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -15,7 +15,7 @@ use rustc_fs_util::path_to_c_string; use rustc_middle::bug; use rustc_session::Session; use rustc_session::config::{PrintKind, PrintRequest}; -use rustc_span::symbol::Symbol; +use rustc_span::Symbol; use rustc_target::spec::{MergeFunctions, PanicStrategy, SmallDataThresholdSupport}; use rustc_target::target_features::{RUSTC_SPECIAL_FEATURES, RUSTC_SPECIFIC_FEATURES}; @@ -373,9 +373,9 @@ pub fn target_features_cfg(sess: &Session, allow_unstable: bool) -> Vec<Symbol> .rust_target_features() .iter() .filter(|(_, gate, _)| gate.in_cfg()) - .filter_map(|&(feature, gate, _)| { + .filter_map(|(feature, gate, _)| { if sess.is_nightly_build() || allow_unstable || gate.requires_nightly().is_none() { - Some(feature) + Some(*feature) } else { None } @@ -718,7 +718,7 @@ pub(crate) fn global_llvm_features( } Some((_, stability, _)) => { if let Err(reason) = - stability.compute_toggleability(&sess.target).allow_toggle() + stability.toggle_allowed(&sess.target, enable_disable == '+') { sess.dcx().emit_warn(ForbiddenCTargetFeature { feature, reason }); } else if stability.requires_nightly().is_some() { |
