Skip to content

Commit 4fe3559

Browse files
g2pBurntSushi
authored andcommitted
Unconditionally build with no_std
1 parent 383e595 commit 4fe3559

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

src/aarch64/neon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ impl Aarch64I8x16 for i8x16 {
630630
#[doc(hidden)]
631631
pub mod common {
632632
use super::super::super::*;
633-
use std::mem;
633+
use core::mem;
634634

635635
#[inline]
636636
pub fn f32x4_sqrt(x: f32x4) -> f32x4 {

src/arm/neon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ impl u8x8 {
473473
pub mod common {
474474
use super::super::super::*;
475475
use super::*;
476-
use std::mem;
476+
use core::mem;
477477

478478
#[inline]
479479
pub fn f32x4_sqrt(x: f32x4) -> f32x4 {

src/common.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ use super::{
99

1010
Unalign, bitcast,
1111
};
12-
use std::mem;
13-
use std::ops;
12+
use core::{mem,ops};
1413

1514
#[cfg(any(target_arch = "x86",
1615
target_arch = "x86_64"))]

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! `simd` offers a basic interface to the SIMD functionality of CPUs.
2+
#![no_std]
23

34
#![feature(cfg_target_feature, repr_simd, platform_intrinsics, const_fn)]
45
#![allow(non_camel_case_types)]
@@ -9,7 +10,7 @@ extern crate serde;
910
#[macro_use]
1011
extern crate serde_derive;
1112

12-
use std::mem;
13+
use core::mem;
1314

1415
/// Boolean type for 8-bit integers.
1516
#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]

src/sixty_four.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ use super::{
1111

1212
Unalign, bitcast,
1313
};
14-
use std::mem;
15-
use std::ops;
14+
use core::{mem,ops};
1615

1716
/// Boolean type for 64-bit integers.
1817
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]

src/v256.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(dead_code)]
2-
use std::ops;
3-
use std::mem;
2+
use core::{mem,ops};
43
#[allow(unused_imports)]
54
use super::{
65
Simd,

src/x86/avx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extern "platform-intrinsic" {
5454
#[doc(hidden)]
5555
pub mod common {
5656
use super::*;
57-
use std::mem;
57+
use core::mem;
5858

5959
macro_rules! bools {
6060
($($ty: ty, $all: ident, $any: ident, $testc: ident, $testz: ident;)*) => {

src/x86/sse2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern "platform-intrinsic" {
4848
#[doc(hidden)]
4949
pub mod common {
5050
use super::super::super::*;
51-
use std::mem;
51+
use core::mem;
5252

5353
#[inline]
5454
pub fn f32x4_sqrt(x: f32x4) -> f32x4 {

0 commit comments

Comments
 (0)