Skip to content

Commit 1a1e6c8

Browse files
committed
std: Move simd to core::simd and reexport. rust-lang#1457
[breaking-change]
1 parent 1240197 commit 1a1e6c8

File tree

10 files changed

+17
-15
lines changed

10 files changed

+17
-15
lines changed

src/libcore/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
html_root_url = "http://doc.rust-lang.org/")]
5454

5555
#![no_std]
56-
#![feature(globs, macro_rules, managed_boxes, phase)]
56+
#![feature(globs, macro_rules, managed_boxes, phase, simd)]
5757
#![deny(missing_doc)]
5858

5959
#[cfg(test)] extern crate realcore = "core";
@@ -124,6 +124,7 @@ pub mod iter;
124124
pub mod option;
125125
pub mod raw;
126126
pub mod result;
127+
pub mod simd;
127128
pub mod slice;
128129
pub mod str;
129130
pub mod tuple;

src/libstd/unstable/simd.rs renamed to src/libcore/simd.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//! SIMD vectors
1212
1313
#![allow(non_camel_case_types)]
14+
#![allow(missing_doc)]
1415

1516
#[experimental]
1617
#[simd]

src/libstd/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
104104
html_root_url = "http://doc.rust-lang.org/")]
105105
#![feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args,
106-
simd, linkage, default_type_params, phase, concat_idents, quad_precision_float)]
106+
linkage, default_type_params, phase, concat_idents, quad_precision_float)]
107107

108108
// Don't link to std. We are std.
109109
#![no_std]
@@ -151,6 +151,7 @@ pub use core::mem;
151151
#[cfg(not(test))] pub use core::ops;
152152
pub use core::ptr;
153153
pub use core::raw;
154+
pub use core::simd;
154155
pub use core::tuple;
155156
#[cfg(not(test))] pub use core::ty;
156157
pub use core::result;

src/libstd/unstable/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub use core::finally;
1414

1515
pub mod dynamic_lib;
1616

17-
pub mod simd;
1817
pub mod sync;
1918
pub mod mutex;
2019

src/test/bench/shootout-mandelbrot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extern crate sync;
1717

1818
use std::io;
1919
use std::os;
20-
use std::unstable::simd::f64x2;
20+
use std::simd::f64x2;
2121
use sync::Future;
2222
use sync::Arc;
2323

src/test/compile-fail/simd-binop.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@
1212

1313
#![allow(experimental)]
1414

15-
use std::unstable::simd::f32x4;
15+
use std::simd::f32x4;
1616

1717
fn main() {
1818

1919
let _ = f32x4(0.0, 0.0, 0.0, 0.0) == f32x4(0.0, 0.0, 0.0, 0.0);
20-
//~^ ERROR binary comparison operation `==` not supported for floating point SIMD vector `std::unstable::simd::f32x4`
20+
//~^ ERROR binary comparison operation `==` not supported for floating point SIMD vector `core::simd::f32x4`
2121

2222
let _ = f32x4(0.0, 0.0, 0.0, 0.0) != f32x4(0.0, 0.0, 0.0, 0.0);
23-
//~^ ERROR binary comparison operation `!=` not supported for floating point SIMD vector `std::unstable::simd::f32x4`
23+
//~^ ERROR binary comparison operation `!=` not supported for floating point SIMD vector `core::simd::f32x4`
2424

2525
let _ = f32x4(0.0, 0.0, 0.0, 0.0) < f32x4(0.0, 0.0, 0.0, 0.0);
26-
//~^ ERROR binary comparison operation `<` not supported for floating point SIMD vector `std::unstable::simd::f32x4`
26+
//~^ ERROR binary comparison operation `<` not supported for floating point SIMD vector `core::simd::f32x4`
2727

2828
let _ = f32x4(0.0, 0.0, 0.0, 0.0) <= f32x4(0.0, 0.0, 0.0, 0.0);
29-
//~^ ERROR binary comparison operation `<=` not supported for floating point SIMD vector `std::unstable::simd::f32x4`
29+
//~^ ERROR binary comparison operation `<=` not supported for floating point SIMD vector `core::simd::f32x4`
3030

3131
let _ = f32x4(0.0, 0.0, 0.0, 0.0) >= f32x4(0.0, 0.0, 0.0, 0.0);
32-
//~^ ERROR binary comparison operation `>=` not supported for floating point SIMD vector `std::unstable::simd::f32x4`
32+
//~^ ERROR binary comparison operation `>=` not supported for floating point SIMD vector `core::simd::f32x4`
3333

3434
let _ = f32x4(0.0, 0.0, 0.0, 0.0) > f32x4(0.0, 0.0, 0.0, 0.0);
35-
//~^ ERROR binary comparison operation `>` not supported for floating point SIMD vector `std::unstable::simd::f32x4`
35+
//~^ ERROR binary comparison operation `>` not supported for floating point SIMD vector `core::simd::f32x4`
3636

3737
}

src/test/compile-fail/simd-experimental.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![deny(experimental)]
1212

13-
use std::unstable::simd;
13+
use std::simd;
1414

1515
fn main() {
1616
let _ = simd::i64x2(0, 0); //~ ERROR: experimental

src/test/debuginfo/simd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#![allow(experimental)]
4444
#![allow(unused_variable)]
4545

46-
use std::unstable::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2};
46+
use std::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2};
4747

4848
fn main() {
4949

src/test/run-pass/simd-binop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![allow(experimental)]
1212

13-
use std::unstable::simd::{i32x4, f32x4, u32x4};
13+
use std::simd::{i32x4, f32x4, u32x4};
1414

1515
fn eq_u32x4(u32x4(x0, x1, x2, x3): u32x4, u32x4(y0, y1, y2, y3): u32x4) -> bool {
1616
(x0 == y0) && (x1 == y1) && (x2 == y2) && (x3 == y3)

src/test/run-pass/simd-issue-10604.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
#![feature(simd)]
1414

1515
pub fn main() {
16-
let _o = None::<std::unstable::simd::i32x4>;
16+
let _o = None::<std::simd::i32x4>;
1717
}

0 commit comments

Comments
 (0)