clean up target feature system; most of the toggleability is now handled by the ABI target feature check

This commit is contained in:
Ralf Jung 2024-12-26 18:59:19 +01:00
parent 2bf27e09be
commit cfae43d638
4 changed files with 349 additions and 438 deletions

View file

@ -728,7 +728,7 @@ pub(crate) fn global_llvm_features(
sess.dcx().emit_warn(unknown_feature);
}
Some((_, stability, _)) => {
if let Err(reason) = stability.toggle_allowed(&sess.target, enable) {
if let Err(reason) = stability.toggle_allowed() {
sess.dcx().emit_warn(ForbiddenCTargetFeature {
feature,
enabled: if enable { "enabled" } else { "disabled" },