Skip to content

Commit

Permalink
Rollup merge of rust-lang#96483 - Urgau:check-cfg-target_feature, r=p…
Browse files Browse the repository at this point in the history
…etrochenkov

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 rust-lang#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`
  • Loading branch information
Dylan-DPC committed Apr 28, 2022
2 parents 4c628bb + beb4e16 commit 89db345
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 89db345

Please sign in to comment.