Skip to content

Commit d05795a

Browse files
committed
remove unused features; formatting
1 parent eb87fb1 commit d05795a

File tree

5 files changed

+39
-58
lines changed

5 files changed

+39
-58
lines changed

coresimd/arm/mod.rs

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,28 @@ mod v7;
2020
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
2121
pub use self::v7::*;
2222

23-
#[cfg(
24-
any(
25-
all(target_feature = "v7", not(target_feature = "mclass")),
26-
dox
27-
)
28-
)]
23+
#[cfg(any(
24+
all(target_feature = "v7", not(target_feature = "mclass")),
25+
dox
26+
))]
2927
mod dsp;
30-
#[cfg(
31-
any(
32-
all(target_feature = "v7", not(target_feature = "mclass")),
33-
dox
34-
)
35-
)]
28+
#[cfg(any(
29+
all(target_feature = "v7", not(target_feature = "mclass")),
30+
dox
31+
))]
3632
pub use self::dsp::*;
3733

3834
// NEON is supported on AArch64, and on ARM when built with the v7 and neon
3935
// features. Building ARM without neon produces incorrect codegen.
40-
#[cfg(
41-
any(
42-
target_arch = "aarch64",
43-
all(target_feature = "v7", target_feature = "neon"),
44-
dox
45-
)
46-
)]
36+
#[cfg(any(
37+
target_arch = "aarch64",
38+
all(target_feature = "v7", target_feature = "neon"),
39+
dox
40+
))]
4741
mod neon;
48-
#[cfg(
49-
any(
50-
target_arch = "aarch64",
51-
all(target_feature = "v7", target_feature = "neon"),
52-
dox
53-
)
54-
)]
42+
#[cfg(any(
43+
target_arch = "aarch64",
44+
all(target_feature = "v7", target_feature = "neon"),
45+
dox
46+
))]
5547
pub use self::neon::*;

crates/coresimd/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
rustc_attrs,
2727
stdsimd,
2828
staged_api,
29-
core_float,
30-
core_slice_ext,
3129
align_offset,
3230
doc_cfg,
3331
mmx_target_feature,
@@ -43,7 +41,6 @@
4341
feature(
4442
use_extern_macros,
4543
test,
46-
attr_literals,
4744
abi_vectorcall,
4845
untagged_unions
4946
)

crates/stdsimd-test/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ fn parse_objdump(output: &str) -> HashMap<String, Vec<Function>> {
137137
.skip_while(|s| {
138138
s.len() == expected_len
139139
&& usize::from_str_radix(s, 16).is_ok()
140-
})
141-
.map(|s| s.to_string())
140+
}).map(|s| s.to_string())
142141
.collect::<Vec<String>>();
143142
instructions.push(Instruction { parts });
144143
}
@@ -232,8 +231,7 @@ fn parse_dumpbin(output: &str) -> HashMap<String, Vec<Function>> {
232231
.skip(1)
233232
.skip_while(|s| {
234233
s.len() == 2 && usize::from_str_radix(s, 16).is_ok()
235-
})
236-
.map(|s| s.to_string())
234+
}).map(|s| s.to_string())
237235
.collect::<Vec<String>>();
238236
instructions.push(Instruction { parts });
239237
}

crates/stdsimd/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! SIMD and vendor intrinsics support library.
22
//!
33
//! This crate defines the vendor intrinsics and types primarily used for SIMD
4-
//! in Rust.
4+
//! in Rust.
55
66
#![feature(const_fn, integer_atomics, staged_api, stdsimd)]
77
#![feature(doc_cfg, allow_internal_unstable)]
@@ -30,6 +30,6 @@ use __do_not_use_this_import::fs;
3030
#[allow(unused_imports)]
3131
use __do_not_use_this_import::io;
3232
#[allow(unused_imports)]
33-
use __do_not_use_this_import::prelude;
34-
#[allow(unused_imports)]
3533
use __do_not_use_this_import::mem;
34+
#[allow(unused_imports)]
35+
use __do_not_use_this_import::prelude;

crates/stdsimd/tests/cpu-detection.rs

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,32 @@
55
allow(option_unwrap_used, use_debug, print_stdout)
66
)]
77

8-
#[cfg(
9-
any(
10-
target_arch = "arm",
11-
target_arch = "aarch64",
12-
target_arch = "x86",
13-
target_arch = "x86_64",
14-
target_arch = "powerpc",
15-
target_arch = "powerpc64"
16-
)
17-
)]
8+
#[cfg(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+
))]
1816
#[macro_use]
1917
extern crate stdsimd;
2018

2119
#[test]
22-
#[cfg(
23-
all(
24-
target_arch = "arm",
25-
any(target_os = "linux", target_os = "android")
26-
)
27-
)]
20+
#[cfg(all(
21+
target_arch = "arm",
22+
any(target_os = "linux", target_os = "android")
23+
))]
2824
fn arm_linux() {
2925
println!("neon: {}", is_arm_feature_detected!("neon"));
3026
println!("pmull: {}", is_arm_feature_detected!("pmull"));
3127
}
3228

3329
#[test]
34-
#[cfg(
35-
all(
36-
target_arch = "aarch64",
37-
any(target_os = "linux", target_os = "android")
38-
)
39-
)]
30+
#[cfg(all(
31+
target_arch = "aarch64",
32+
any(target_os = "linux", target_os = "android")
33+
))]
4034
fn aarch64_linux() {
4135
println!("fp: {}", is_aarch64_feature_detected!("fp"));
4236
println!("fp16: {}", is_aarch64_feature_detected!("fp16"));

0 commit comments

Comments
 (0)