Skip to content

Tweak some warnings around #[target_feature] #50096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2018

Conversation

alexcrichton
Copy link
Member

This commit fixes up some issues discovered when getting the stdsimd crate's CI compiling again.

When compiling crates we'll be calculating and parsing `#[target_feature]` for
upstream crates. We'll also be checking the stability of listed features, but we
only want to check the listed stability during the actual crate that wrote the
relevant code. This commit updates the `target_feature` process to ignore
foreign `DefId` instances and only check the feature whitelist for local
functions.

Closes rust-lang#50094
This commit transitions the `target_feature` attribute from `Normal` to
`Whitelisted`. Discovered in rust-lang#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 rust-lang#50095
@alexcrichton
Copy link
Member Author

r? @eddyb

@alexcrichton
Copy link
Member Author

cc @gnzlbg

@gnzlbg
Copy link
Contributor

gnzlbg commented Apr 20, 2018

aha, this explains it 😆

@pietroalbini pietroalbini added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2018
@alexcrichton
Copy link
Member Author

r? @michaelwoerister

@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 24, 2018

📌 Commit 81a6437 has been approved by michaelwoerister

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2018
@bors
Copy link
Collaborator

bors commented Apr 24, 2018

⌛ Testing commit 81a6437 with merge 190a6c4...

bors added a commit that referenced this pull request Apr 24, 2018
…ister

Tweak some warnings around #[target_feature]

This commit fixes up some issues discovered when getting the `stdsimd` crate's CI compiling again.
@bors
Copy link
Collaborator

bors commented Apr 24, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: michaelwoerister
Pushing 190a6c4 to master...

@bors bors merged commit 81a6437 into rust-lang:master Apr 24, 2018
@alexcrichton alexcrichton deleted the less-simd-warnings branch May 10, 2018 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants