diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-05 10:34:33 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-01-05 10:46:30 +0100 |
| commit | 2e64b5352be9ec8b2a7b956c2be108394b85f4b0 (patch) | |
| tree | 1b266e63d96229182c200d2785455ca04a8e5092 /compiler/rustc_codegen_ssa/src | |
| parent | 43ede97ebf7d874c9076723840c945b051b10ee2 (diff) | |
| download | rust-2e64b5352be9ec8b2a7b956c2be108394b85f4b0.tar.gz rust-2e64b5352be9ec8b2a7b956c2be108394b85f4b0.zip | |
add dedicated type for ABI target feature constraints
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/target_features.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 61eeae630ed..d8b9bdb55da 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -32,7 +32,7 @@ pub(crate) fn from_target_feature_attr( .emit(); }; let rust_features = tcx.features(); - let (_abi_enable, abi_disable) = tcx.sess.target.abi_required_features(); + let abi_feature_constraints = tcx.sess.target.abi_required_features(); for item in list { // Only `enable = ...` is accepted in the meta-item list. if !item.has_name(sym::enable) { @@ -87,7 +87,7 @@ pub(crate) fn from_target_feature_attr( // But ensure the ABI does not forbid enabling this. // Here we do assume that LLVM doesn't add even more implied features // we don't know about, at least no features that would have ABI effects! - if abi_disable.contains(&name.as_str()) { + if abi_feature_constraints.incompatible.contains(&name.as_str()) { tcx.dcx().emit_err(errors::ForbiddenTargetFeatureAttr { span: item.span(), feature: name.as_str(), |
