Skip to content

Commit 68b3ddf

Browse files
committed
Fix various compilation errors
1 parent 85f59ee commit 68b3ddf

File tree

8 files changed

+36
-17
lines changed

8 files changed

+36
-17
lines changed

crates/core_arch/src/arm/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
mod sat;
1212

1313
#[cfg(any(target_feature = "v6", doc))]
14+
// Remove warning because this module is currently empty.
15+
#[allow(unused_imports)]
1416
pub use self::sat::*;
1517

1618
// Supported arches: 5TE, 7E-M. See Section 10.1 of ACLE (e.g. QADD)

crates/core_arch/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ mod core_arch;
7474
#[stable(feature = "stdsimd", since = "1.27.0")]
7575
pub mod arch {
7676
#[stable(feature = "stdsimd", since = "1.27.0")]
77+
#[allow(unused_imports)]
7778
pub use crate::core_arch::arch::*;
7879
#[stable(feature = "stdsimd", since = "1.27.0")]
7980
pub use core::arch::asm;

crates/intrinsic-test/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ fn generate_rust_program(notices: &str, intrinsic: &Intrinsic, a32: bool) -> Str
166166
format!(
167167
r#"{notices}#![feature(simd_ffi)]
168168
#![feature(link_llvm_intrinsics)]
169+
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_neon_intrinsics))]
170+
#![feature(stdarch_arm_crc32)]
171+
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_fcma))]
172+
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_dotprod))]
173+
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_i8mm))]
174+
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_sha3))]
175+
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_sm4))]
176+
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_ftts))]
169177
#![allow(overflowing_literals)]
170178
#![allow(non_upper_case_globals)]
171179
use core_arch::arch::{target_arch}::*;

crates/std_detect/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#![no_std]
2222
#![allow(internal_features)]
2323
// Temporary hack: needed to build against toolchains from before the mass feature renaming.
24+
// Remove this as soon as the stdarch submodule is updated on nightly.
25+
#![allow(stable_features)]
2426
#![feature(stdsimd)]
2527

2628
#[cfg(test)]

crates/std_detect/tests/cpu-detection.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
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

16-
#[macro_use]
7+
#[cfg_attr(
8+
any(
9+
target_arch = "arm",
10+
target_arch = "aarch64",
11+
target_arch = "x86",
12+
target_arch = "x86_64",
13+
target_arch = "powerpc",
14+
target_arch = "powerpc64"
15+
),
16+
macro_use
17+
)]
1718
extern crate std_detect;
1819

1920
#[test]

crates/std_detect/tests/macro_trailing_commas.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#![feature(stdarch_arm_feature_detection, stdarch_powerpc_feature_detection)]
1+
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))]
2+
#![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))]
3+
#![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))]
24
#![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)]
35

46
#[cfg(any(

crates/stdarch-verify/tests/arm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
#![allow(unused)]
2+
13
use std::collections::HashMap;
24

35
use serde::Deserialize;
46

5-
#[allow(unused)]
67
struct Function {
78
name: &'static str,
89
arguments: &'static [&'static Type],

examples/connect5.rs

Lines changed: 3 additions & 1 deletion
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)