Skip to content
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

Rename misleading features #1355

Merged
merged 4 commits into from
Nov 21, 2022
Merged

Conversation

calebzulawski
Copy link
Member

@calebzulawski calebzulawski commented Nov 17, 2022

Renamed features according to rust-lang/rust#100752 (and #1325)

This works on master, but rust-lang/rust#103750 hasn't hit nightly yet. landed on nightly

An open question: in is_x86_feature_detected, should avx512gfni be an alias for gfni (even though it doesn't actually check for avx512f), or should it be a separate feature that checks the multiple feature flags required to enable the AVX-512 GFNI instructions? (and the same goes for avx512vaes and avx512vpclmulqdq)

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@Amanieu
Copy link
Member

Amanieu commented Nov 18, 2022

I think avx512gfni can just be an alias for gfni, however it would be nice to have a deprecation warning trigger when you use it.

@calebzulawski
Copy link
Member Author

I added a deprecation warning, but the way it's emitted is admittedly a hack. It emits this reasonable message:

warning: use of deprecated macro `deprecated_feature`: the `avx512gfni` feature has been renamed to `gfni`
  --> crates/std_detect/tests/x86-specific.rs:40:33
   |
40 |     println!("avx512gfni {:?}", is_x86_feature_detected!("avx512gfni"));
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default
   = note: this warning originates in the macro `is_x86_feature_detected` (in Nightly builds, run with -Z macro-backtrace for more info)

@Amanieu Amanieu merged commit 37fe365 into rust-lang:master Nov 21, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2023
…nieu

Remove misleading target feature aliases

Fixes rust-lang#100752.  This is a follow up to rust-lang#103750. These aliases could not be completely removed until rust-lang/stdarch#1355 landed.

cc `@Amanieu`
RalfJung pushed a commit to RalfJung/miri that referenced this pull request May 16, 2023
Remove misleading target feature aliases

Fixes #100752.  This is a follow up to #103750. These aliases could not be completely removed until rust-lang/stdarch#1355 landed.

cc `@Amanieu`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
Remove misleading target feature aliases

Fixes #100752.  This is a follow up to #103750. These aliases could not be completely removed until rust-lang/stdarch#1355 landed.

cc `@Amanieu`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
Remove misleading target feature aliases

Fixes #100752.  This is a follow up to #103750. These aliases could not be completely removed until rust-lang/stdarch#1355 landed.

cc `@Amanieu`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants