about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/feature-gate-simd-ffi.rs6
-rw-r--r--src/test/compile-fail/gated-simd.rs14
-rw-r--r--src/test/compile-fail/simd-binop.rs37
-rw-r--r--src/test/compile-fail/simd-type.rs11
4 files changed, 7 insertions, 61 deletions
diff --git a/src/test/compile-fail/feature-gate-simd-ffi.rs b/src/test/compile-fail/feature-gate-simd-ffi.rs
index 32c50b1b8c1..f7bd2fcbceb 100644
--- a/src/test/compile-fail/feature-gate-simd-ffi.rs
+++ b/src/test/compile-fail/feature-gate-simd-ffi.rs
@@ -8,12 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(simd, core_simd)]
-#![allow(dead_code)]
+#![feature(repr_simd, core_simd)]
+#![allow(dead_code, deprecated)]
 
 use std::simd::f32x4;
 
-#[simd] #[derive(Copy, Clone)] #[repr(C)] struct LocalSimd(u8, u8);
+#[repr(simd)] #[derive(Copy, Clone)] #[repr(C)] struct LocalSimd(u8, u8);
 
 extern {
     fn foo() -> f32x4; //~ ERROR use of SIMD type
diff --git a/src/test/compile-fail/gated-simd.rs b/src/test/compile-fail/gated-simd.rs
deleted file mode 100644
index 59c44bff3c7..00000000000
--- a/src/test/compile-fail/gated-simd.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[simd]
-pub struct i64x2(i64, i64); //~ ERROR: SIMD types are experimental
-
-fn main() {}
diff --git a/src/test/compile-fail/simd-binop.rs b/src/test/compile-fail/simd-binop.rs
deleted file mode 100644
index feffe5c0b06..00000000000
--- a/src/test/compile-fail/simd-binop.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-tidy-linelength
-
-#![feature(core)]
-
-use std::simd::f32x4;
-
-fn main() {
-
-    let _ = f32x4(0.0, 0.0, 0.0, 0.0) == f32x4(0.0, 0.0, 0.0, 0.0);
-    //~^ ERROR binary comparison operation `==` not supported for floating point SIMD vector `core::simd::f32x4`
-
-    let _ = f32x4(0.0, 0.0, 0.0, 0.0) != f32x4(0.0, 0.0, 0.0, 0.0);
-    //~^ ERROR binary comparison operation `!=` not supported for floating point SIMD vector `core::simd::f32x4`
-
-    let _ = f32x4(0.0, 0.0, 0.0, 0.0) < f32x4(0.0, 0.0, 0.0, 0.0);
-    //~^ ERROR binary comparison operation `<` not supported for floating point SIMD vector `core::simd::f32x4`
-
-    let _ = f32x4(0.0, 0.0, 0.0, 0.0) <= f32x4(0.0, 0.0, 0.0, 0.0);
-    //~^ ERROR binary comparison operation `<=` not supported for floating point SIMD vector `core::simd::f32x4`
-
-    let _ = f32x4(0.0, 0.0, 0.0, 0.0) >= f32x4(0.0, 0.0, 0.0, 0.0);
-    //~^ ERROR binary comparison operation `>=` not supported for floating point SIMD vector `core::simd::f32x4`
-
-    let _ = f32x4(0.0, 0.0, 0.0, 0.0) > f32x4(0.0, 0.0, 0.0, 0.0);
-    //~^ ERROR binary comparison operation `>` not supported for floating point SIMD vector `core::simd::f32x4`
-
-}
diff --git a/src/test/compile-fail/simd-type.rs b/src/test/compile-fail/simd-type.rs
index c47bc1747de..cde63aa0cd1 100644
--- a/src/test/compile-fail/simd-type.rs
+++ b/src/test/compile-fail/simd-type.rs
@@ -8,18 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(simd)]
+#![feature(repr_simd)]
 
-#[simd]
-struct vec4<T>(T, T, T, T); //~ ERROR SIMD vector cannot be generic
-
-#[simd]
+#[repr(simd)]
 struct empty; //~ ERROR SIMD vector cannot be empty
 
-#[simd]
+#[repr(simd)]
 struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous
 
-#[simd]
+#[repr(simd)]
 struct int4(isize, isize, isize, isize); //~ ERROR SIMD vector element type should be machine type
 
 fn main() {}