Skip to content

Commit 4fc3a6c

Browse files
committed
Attempt to fix cpu-detection test
1 parent a02e351 commit 4fc3a6c

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

crates/std_detect/tests/cpu-detection.rs

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
#![feature(
2-
stdarch_internal,
3-
stdarch_arm_feature_detection,
4-
stdarch_powerpc_feature_detection
5-
)]
1+
#![feature(stdarch_internal)]
2+
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))]
3+
#![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))]
4+
#![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))]
65
#![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)]
7-
#![cfg(any(
8-
target_arch = "arm",
9-
target_arch = "aarch64",
10-
target_arch = "x86",
11-
target_arch = "x86_64",
12-
target_arch = "powerpc",
13-
target_arch = "powerpc64"
14-
))]
156

167
#[macro_use]
178
extern crate std_detect;

examples/connect5.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
//! You should see a game self-playing. In the end of the game, it shows the average time for
2929
//! each move.
3030
31-
#![feature(avx512_target_feature, stdarch_x86_avx512)]
31+
#![feature(avx512_target_feature)]
32+
#![cfg_attr(target_arch = "x86", feature(stdarch_x86_avx512))]
33+
#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512))]
3234
#![feature(stmt_expr_attributes)]
3335

3436
use rand::seq::SliceRandom;

0 commit comments

Comments
 (0)