Skip to content

Commit

Permalink
Fix various compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Oct 29, 2023
1 parent 35681a9 commit d68e621
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 17 deletions.
2 changes: 2 additions & 0 deletions crates/core_arch/src/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
mod sat;

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

// Supported arches: 5TE, 7E-M. See Section 10.1 of ACLE (e.g. QADD)
Expand Down
1 change: 1 addition & 0 deletions crates/core_arch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ mod core_arch;
#[stable(feature = "stdsimd", since = "1.27.0")]
pub mod arch {
#[stable(feature = "stdsimd", since = "1.27.0")]
#[allow(unused_imports)]
pub use crate::core_arch::arch::*;
#[stable(feature = "stdsimd", since = "1.27.0")]
pub use core::arch::asm;
Expand Down
8 changes: 8 additions & 0 deletions crates/intrinsic-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ fn generate_rust_program(notices: &str, intrinsic: &Intrinsic, a32: bool) -> Str
format!(
r#"{notices}#![feature(simd_ffi)]
#![feature(link_llvm_intrinsics)]
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_neon_intrinsics))]
#![feature(stdarch_arm_crc32)]
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_fcma))]
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_dotprod))]
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_i8mm))]
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_sha3))]
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_sm4))]
#![cfg_attr(target_arch = "aarch64", feature(stdarch_neon_ftts))]
#![allow(overflowing_literals)]
#![allow(non_upper_case_globals)]
use core_arch::arch::{target_arch}::*;
Expand Down
2 changes: 2 additions & 0 deletions crates/std_detect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#![no_std]
#![allow(internal_features)]
// Temporary hack: needed to build against toolchains from before the mass feature renaming.
// Remove this as soon as the stdarch submodule is updated on nightly.
#![allow(stable_features)]
#![feature(stdsimd)]

#[cfg(test)]
Expand Down
29 changes: 15 additions & 14 deletions crates/std_detect/tests/cpu-detection.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#![feature(
stdarch_internal,
stdarch_arm_feature_detection,
stdarch_powerpc_feature_detection
)]
#![feature(stdarch_internal)]
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))]
#![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))]
#![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))]
#![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)]
#![cfg(any(
target_arch = "arm",
target_arch = "aarch64",
target_arch = "x86",
target_arch = "x86_64",
target_arch = "powerpc",
target_arch = "powerpc64"
))]

#[macro_use]
#[cfg_attr(
any(
target_arch = "arm",
target_arch = "aarch64",
target_arch = "x86",
target_arch = "x86_64",
target_arch = "powerpc",
target_arch = "powerpc64"
),
macro_use
)]
extern crate std_detect;

#[test]
Expand Down
4 changes: 3 additions & 1 deletion crates/std_detect/tests/macro_trailing_commas.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#![feature(stdarch_arm_feature_detection, stdarch_powerpc_feature_detection)]
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))]
#![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))]
#![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))]
#![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)]

#[cfg(any(
Expand Down
3 changes: 2 additions & 1 deletion crates/stdarch-verify/tests/arm.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#![allow(unused)]

use std::collections::HashMap;

use serde::Deserialize;

#[allow(unused)]
struct Function {
name: &'static str,
arguments: &'static [&'static Type],
Expand Down
4 changes: 3 additions & 1 deletion examples/connect5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
//! You should see a game self-playing. In the end of the game, it shows the average time for
//! each move.

#![feature(avx512_target_feature, stdarch_x86_avx512)]
#![feature(avx512_target_feature)]
#![cfg_attr(target_arch = "x86", feature(stdarch_x86_avx512))]
#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512))]
#![feature(stmt_expr_attributes)]

use rand::seq::SliceRandom;
Expand Down

0 comments on commit d68e621

Please sign in to comment.