diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-27 18:30:17 +0100 | 
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-01-28 04:40:42 +0100 | 
| commit | 93ee180cfa12cfca5e0ce79bb3d9a3eaf91cf7b5 (patch) | |
| tree | e59f8391d35d7307398c50f49cf00a6d0def9ff6 /compiler/rustc_codegen_gcc/src/lib.rs | |
| parent | f753850659bdf5788332525f3fe395685929c682 (diff) | |
| download | rust-93ee180cfa12cfca5e0ce79bb3d9a3eaf91cf7b5.tar.gz rust-93ee180cfa12cfca5e0ce79bb3d9a3eaf91cf7b5.zip | |
ABI-required target features: warn when they are missing in base CPU (rather than silently enabling them)
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/lib.rs | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/compiler/rustc_codegen_gcc/src/lib.rs b/compiler/rustc_codegen_gcc/src/lib.rs index 38019faa7a9..ce88ac39021 100644 --- a/compiler/rustc_codegen_gcc/src/lib.rs +++ b/compiler/rustc_codegen_gcc/src/lib.rs @@ -493,9 +493,10 @@ fn target_features_cfg( sess.target .rust_target_features() .iter() - .filter(|&&(_, gate, _)| gate.in_cfg()) .filter_map(|&(feature, gate, _)| { - if sess.is_nightly_build() || allow_unstable || gate.requires_nightly().is_none() { + if allow_unstable + || (gate.in_cfg() && (sess.is_nightly_build() || gate.requires_nightly().is_none())) + { Some(feature) } else { None | 
