Skip to content

Commit

Permalink
rustc: Blanket whitelist #[target_feature]
Browse files Browse the repository at this point in the history
This commit transitions the `target_feature` attribute from `Normal` to
`Whitelisted`. Discovered in #50095 the fact of whether this attribute is used
or not is dependent on typechecking running and executing `check_name`, but
incremental compilation doesn't currently account for this, meaning that the
attribute ends up being flagged as unused when it shouldn't be.

I was a little too ambitious it seems hoping that `Normal` could be used, so
instead this transitions to `Whitelisted` to be the same as other codegen
attributes like `#[inline]`

Closes #50095
  • Loading branch information
alexcrichton committed Apr 20, 2018
1 parent fc9da8f commit 81a6437
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
"the `#[naked]` attribute \
is an experimental feature",
cfg_fn!(naked_functions))),
("target_feature", Normal, Ungated),
("target_feature", Whitelisted, Ungated),
("export_name", Whitelisted, Ungated),
("inline", Whitelisted, Ungated),
("link", Whitelisted, Ungated),
Expand Down

0 comments on commit 81a6437

Please sign in to comment.