about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-04-28 02:40:37 +0200
committerGitHub <noreply@github.com>2022-04-28 02:40:37 +0200
commit89db345859a3f4e33aa334713767e79870319369 (patch)
treedd98eee53ea80c1870ba82851d369af60a09d649
parent4c628bbb1c266a8513b364dca5ae7e311a1e0777 (diff)
parentbeb4e16f055aa7925194fd2c360105a6d55f10f6 (diff)
downloadrust-89db345859a3f4e33aa334713767e79870319369.tar.gz
rust-89db345859a3f4e33aa334713767e79870319369.zip
Rollup merge of #96483 - Urgau:check-cfg-target_feature, r=petrochenkov
Add missing `target_feature` to the list of well known cfg names

This PR adds the missing `target_feature` cfg name to the list of well known cfg names.

It was notice missing in https://github.com/rust-lang/rust/issues/96472 thanks to `@bjorn3,` the reason being that `--check-cfg=names()` automatically inherit the names passed by `--cfg` (or internal to `rustc`) and is seems that the vast majority of targets have at least one target feature leading to `target_feature` being a well known name in most target but it should always be a well known name so this PR add it unconditionally to list.

r? `@petrochenkov`
-rw-r--r--compiler/rustc_session/src/config.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 925f6bfd93d..adb2b79038f 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1043,6 +1043,7 @@ impl CrateCheckConfig {
             sym::target_has_atomic_load_store,
             sym::target_has_atomic,
             sym::target_has_atomic_equal_alignment,
+            sym::target_feature,
             sym::panic,
             sym::sanitize,
             sym::debug_assertions,
@@ -1086,6 +1087,10 @@ impl CrateCheckConfig {
             .into_iter()
             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
 
+        // Unknown possible values:
+        //  - `feature`
+        //  - `target_feature`
+
         // No-values
         for name in [
             sym::doc,