mark some target features as 'forbidden' so they cannot be (un)set

For now, this is just a warning, but should become a hard error in the future
This commit is contained in:
Ralf Jung 2024-09-02 11:45:59 +02:00
parent 2dece5bb62
commit ffad9aac27
23 changed files with 372 additions and 158 deletions

View file

@ -370,8 +370,9 @@ impl CheckCfg {
ins!(sym::sanitizer_cfi_normalize_integers, no_values);
ins!(sym::target_feature, empty_values).extend(
rustc_target::target_features::all_known_features()
.map(|(f, _sb)| f)
rustc_target::target_features::all_rust_features()
.filter(|(_, s)| s.is_supported())
.map(|(f, _s)| f)
.chain(rustc_target::target_features::RUSTC_SPECIFIC_FEATURES.iter().cloned())
.map(Symbol::intern),
);