Skip to content

Commit

Permalink
Auto merge of #117915 - matthiaskrgr:rollup-ztljqrr, r=matthiaskrgr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Nov 14, 2023
2 parents dd430bc + 2e00c6f commit 003fa88
Show file tree
Hide file tree
Showing 23 changed files with 404 additions and 291 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ pub fn target_features(sess: &Session, allow_unstable: bool, target_info: &Locke
.iter()
.filter_map(
|&(feature, gate)| {
if sess.is_nightly_build() || allow_unstable || gate.is_none() { Some(feature) } else { None }
if sess.is_nightly_build() || allow_unstable || gate.is_stable() { Some(feature) } else { None }
},
)
.filter(|_feature| {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/callee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 });
Expand Down
Loading

0 comments on commit 003fa88

Please sign in to comment.