diff options
| author | bors <bors@rust-lang.org> | 2023-11-14 22:36:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-14 22:36:39 +0000 |
| commit | 003fa886f51934be9bbae0027df7a4c82040cb12 (patch) | |
| tree | 937c9908a0ab3180e101477680f07d7bde3aa362 /compiler/rustc_codegen_llvm/src | |
| parent | dd430bc8c22f57992ec1457a87437d14283fdd65 (diff) | |
| parent | 2e00c6ffd739cd34c07a9de8193813afbf976595 (diff) | |
| download | rust-003fa886f51934be9bbae0027df7a4c82040cb12.tar.gz rust-003fa886f51934be9bbae0027df7a4c82040cb12.zip | |
Auto merge of #117915 - matthiaskrgr:rollup-ztljqrr, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #116244 (Apply structured suggestion that allows test to work since 1.64) - #117686 (Build pre-coroutine-transform coroutine body on error) - #117834 (target_feature: make it more clear what that 'Option' means) - #117893 (Suggest dereferencing the LHS for binops such as `&T == T`) - #117911 (Fix some typos) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/callee.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/callee.rs b/compiler/rustc_codegen_llvm/src/callee.rs index d5778757caa..0c9f7f19551 100644 --- a/compiler/rustc_codegen_llvm/src/callee.rs +++ b/compiler/rustc_codegen_llvm/src/callee.rs @@ -59,7 +59,7 @@ pub fn get_fn<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) -> // To avoid this, we set the Storage Class to "DllImport" so that // LLVM will prefix the name with `__imp_`. Ideally, we'd like the // existing logic below to set the Storage Class, but it has an - // exemption for MinGW for backwards compatability. + // exemption for MinGW for backwards compatibility. let llfn = cx.declare_fn( &common::i686_decorated_name( &dllimport, diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index cc4ccaf19c2..c86bf81fc13 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -293,7 +293,7 @@ pub fn target_features(sess: &Session, allow_unstable: bool) -> Vec<Symbol> { supported_target_features(sess) .iter() .filter_map(|&(feature, gate)| { - if sess.is_nightly_build() || allow_unstable || gate.is_none() { + if sess.is_nightly_build() || allow_unstable || gate.is_stable() { Some(feature) } else { None @@ -554,7 +554,8 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str UnknownCTargetFeature { feature, rust_feature: PossibleFeature::None } }; sess.emit_warning(unknown_feature); - } else if feature_state.is_some_and(|(_name, feature_gate)| feature_gate.is_some()) + } else if feature_state + .is_some_and(|(_name, feature_gate)| !feature_gate.is_stable()) { // An unstable feature. Warn about using it. sess.emit_warning(UnstableCTargetFeature { feature }); |
