Skip to content

Commit c84bc41

Browse files
committed
unstable: update to latest std::arch
This replaces `is_target_feature_detected!` with `is_x86_feature_detected!` and adds the `cfg_target_feature` required for using said macro.
1 parent dba7f3b commit c84bc41

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,9 @@ another matching engine with fixed memory requirements.
520520
#![deny(missing_docs)]
521521
#![cfg_attr(test, deny(warnings))]
522522
#![cfg_attr(feature = "pattern", feature(pattern))]
523-
#![cfg_attr(feature = "unstable", feature(target_feature, stdsimd))]
523+
#![cfg_attr(
524+
feature = "unstable",
525+
feature(cfg_target_feature, target_feature, stdsimd))]
524526

525527
extern crate aho_corasick;
526528
extern crate memchr;

src/vector/avx2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub struct AVX2VectorBuilder(());
88

99
impl AVX2VectorBuilder {
1010
pub fn new() -> Option<AVX2VectorBuilder> {
11-
if is_target_feature_detected!("avx2") {
11+
if is_x86_feature_detected!("avx2") {
1212
Some(AVX2VectorBuilder(()))
1313
} else {
1414
None

src/vector/ssse3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl SSSE3VectorBuilder {
2020
/// If the SSSE3 feature is not enabled for the current target, then
2121
/// return `None`.
2222
pub fn new() -> Option<SSSE3VectorBuilder> {
23-
if is_target_feature_detected!("ssse3") {
23+
if is_x86_feature_detected!("ssse3") {
2424
Some(SSSE3VectorBuilder(()))
2525
} else {
2626
None

0 commit comments

Comments
 (0)