Skip to content

Commit 612ddf8

Browse files
authored
Merge pull request #421 from JohnTitor/unused-import
Suppress some warnings
2 parents eb9a1bd + acf4f89 commit 612ddf8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/arm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![cfg(not(feature = "no-asm"))]
2+
#![allow(unused_imports)]
23

34
use core::intrinsics;
45

src/mem/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ pub unsafe extern "C" fn bcmp(s1: *const u8, s2: *const u8, n: usize) -> i32 {
6969
}
7070

7171
// `bytes` must be a multiple of `mem::size_of::<T>()`
72+
#[cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
7273
fn memcpy_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes: usize) {
7374
unsafe {
7475
let n = exact_div(bytes, mem::size_of::<T>());
@@ -81,6 +82,7 @@ fn memcpy_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes:
8182
}
8283

8384
// `bytes` must be a multiple of `mem::size_of::<T>()`
85+
#[cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
8486
fn memmove_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes: usize) {
8587
unsafe {
8688
let n = exact_div(bytes, mem::size_of::<T>());
@@ -103,6 +105,7 @@ fn memmove_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes:
103105
}
104106

105107
// `T` must be a primitive integer type, and `bytes` must be a multiple of `mem::size_of::<T>()`
108+
#[cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
106109
fn memset_element_unordered_atomic<T>(s: *mut T, c: u8, bytes: usize)
107110
where
108111
T: Copy + From<u8> + Shl<u32, Output = T> + BitOr<T, Output = T>,

0 commit comments

Comments
 (0)