Skip to content

is_x86_feature_detected!("avx512f") fails to build on beta and nightly #68905

Closed
@oconnor663

Description

@oconnor663

The following program builds and runs on stable but fails to build on nightly:

fn main() {
    dbg!(is_x86_feature_detected!("avx512f"));
}

Here's the build error on rustc 1.43.0-nightly (58b834344 2020-02-05):

error[E0658]: use of unstable library feature 'stdsimd'
 --> src/main.rs:2:10
  |
2 |     dbg!(is_x86_feature_detected!("avx512f"));
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: for more information, see https://github.com/rust-lang/rust/issues/27731
  = help: add `#![feature(stdsimd)]` to the crate attributes to enable
  = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

But note that if I replace "avx512f" with "avx2", the error goes away.

Metadata

Metadata

Assignees

Labels

P-highHigh priorityT-langRelevant to the language team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions