Skip to content

Commit 238647a

Browse files
committed
Fix unused imports on iOS
1 parent a1700f9 commit 238647a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/arm.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
use core::{intrinsics, ptr};
2-
3-
use mem;
1+
use core::intrinsics;
42

53
// NOTE This function and the ones below are implemented using assembly because they using a custom
64
// calling convention which can't be implemented using a normal Rust function
@@ -65,13 +63,15 @@ pub unsafe fn __aeabi_ldivmod() {
6563
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
6664
#[cfg_attr(thumb, linkage = "weak")]
6765
pub unsafe extern "aapcs" fn __aeabi_memcpy(dest: *mut u8, src: *const u8, n: usize) {
68-
mem::memcpy(dest, src, n);
66+
::mem::memcpy(dest, src, n);
6967
}
7068

7169
#[cfg(not(target_os = "ios"))]
7270
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
7371
#[cfg_attr(thumb, linkage = "weak")]
7472
pub unsafe extern "aapcs" fn __aeabi_memcpy4(dest: *mut u8, src: *const u8, mut n: usize) {
73+
use core::ptr;
74+
7575
let mut dest = dest as *mut u32;
7676
let mut src = src as *mut u32;
7777

@@ -96,7 +96,7 @@ pub unsafe extern "aapcs" fn __aeabi_memcpy8(dest: *mut u8, src: *const u8, n: u
9696
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
9797
#[cfg_attr(thumb, linkage = "weak")]
9898
pub unsafe extern "aapcs" fn __aeabi_memmove(dest: *mut u8, src: *const u8, n: usize) {
99-
mem::memmove(dest, src, n);
99+
::mem::memmove(dest, src, n);
100100
}
101101

102102
#[cfg(not(target_os = "ios"))]
@@ -118,13 +118,15 @@ pub unsafe extern "aapcs" fn __aeabi_memmove8(dest: *mut u8, src: *const u8, n:
118118
#[cfg_attr(thumb, linkage = "weak")]
119119
pub unsafe extern "aapcs" fn __aeabi_memset(dest: *mut u8, n: usize, c: i32) {
120120
// Note the different argument order
121-
mem::memset(dest, c, n);
121+
::mem::memset(dest, c, n);
122122
}
123123

124124
#[cfg(not(target_os = "ios"))]
125125
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
126126
#[cfg_attr(thumb, linkage = "weak")]
127127
pub unsafe extern "aapcs" fn __aeabi_memset4(dest: *mut u8, mut n: usize, c: i32) {
128+
use core::ptr;
129+
128130
let mut dest = dest as *mut u32;
129131

130132
let byte = (c as u32) & 0xff;

0 commit comments

Comments
 (0)