about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2018-02-06 14:15:36 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2018-03-08 08:34:17 +0100
commitf363e08c9dbddc339eed14b59580de784f74d4e2 (patch)
tree88477dabaafe499144e8bc67a478b28efcef33b4 /src
parentf68dc0190a369b6ce9bcfaae26d1b07941028da0 (diff)
downloadrust-f363e08c9dbddc339eed14b59580de784f74d4e2.tar.gz
rust-f363e08c9dbddc339eed14b59580de784f74d4e2.zip
Update compile-fail tests
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/array_const_index-0.rs1
-rw-r--r--src/test/compile-fail/array_const_index-1.rs1
-rw-r--r--src/test/compile-fail/const-err-early.rs5
-rw-r--r--src/test/compile-fail/const-err-multi.rs7
-rw-r--r--src/test/compile-fail/const-err.rs2
-rw-r--r--src/test/compile-fail/const-eval-overflow2.rs32
-rw-r--r--src/test/compile-fail/const-eval-overflow2b.rs32
-rw-r--r--src/test/compile-fail/const-eval-overflow2c.rs32
-rw-r--r--src/test/compile-fail/const-slice-oob.rs1
9 files changed, 24 insertions, 89 deletions
diff --git a/src/test/compile-fail/array_const_index-0.rs b/src/test/compile-fail/array_const_index-0.rs
index 35e7a422562..501c66e75cd 100644
--- a/src/test/compile-fail/array_const_index-0.rs
+++ b/src/test/compile-fail/array_const_index-0.rs
@@ -11,7 +11,6 @@
 const A: &'static [i32] = &[];
 const B: i32 = (&A)[1];
 //~^ ERROR constant evaluation error
-//~| ERROR E0080
 //~| index out of bounds: the len is 0 but the index is 1
 
 fn main() {
diff --git a/src/test/compile-fail/array_const_index-1.rs b/src/test/compile-fail/array_const_index-1.rs
index db4cfa42689..d3b43e83bfe 100644
--- a/src/test/compile-fail/array_const_index-1.rs
+++ b/src/test/compile-fail/array_const_index-1.rs
@@ -11,7 +11,6 @@
 const A: [i32; 0] = [];
 const B: i32 = A[1];
 //~^ ERROR constant evaluation error
-//~| ERROR E0080
 //~| index out of bounds: the len is 0 but the index is 1
 
 fn main() {
diff --git a/src/test/compile-fail/const-err-early.rs b/src/test/compile-fail/const-err-early.rs
index 3182ffa73b0..53077d74ce5 100644
--- a/src/test/compile-fail/const-err-early.rs
+++ b/src/test/compile-fail/const-err-early.rs
@@ -13,16 +13,11 @@
 pub const A: i8 = -std::i8::MIN; //~ ERROR E0080
 //~| ERROR const_err
 //~| ERROR const_err
-//~| ERROR E0080
 pub const B: u8 = 200u8 + 200u8; //~ ERROR E0080
-//~| ERROR E0080
 pub const C: u8 = 200u8 * 4; //~ ERROR E0080
-//~| ERROR E0080
 pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR E0080
-//~| ERROR E0080
 pub const E: u8 = [5u8][1];
 //~^ ERROR E0080
-//~| ERROR E0080
 
 fn main() {
     let _a = A;
diff --git a/src/test/compile-fail/const-err-multi.rs b/src/test/compile-fail/const-err-multi.rs
index 5dd8651005d..d72097848fe 100644
--- a/src/test/compile-fail/const-err-multi.rs
+++ b/src/test/compile-fail/const-err-multi.rs
@@ -14,19 +14,12 @@ pub const A: i8 = -std::i8::MIN;
 //~^ ERROR E0080
 //~| ERROR const_err
 //~| ERROR const_err
-//~| ERROR constant evaluation error
-//~| ERROR constant evaluation error
-//~| ERROR constant evaluation error
-//~| ERROR E0080
 pub const B: i8 = A;
 //~^ ERROR E0080
-//~| ERROR E0080
 pub const C: u8 = A as u8;
 //~^ ERROR E0080
-//~| ERROR E0080
 pub const D: i8 = 50 - A;
 //~^ ERROR E0080
-//~| ERROR E0080
 
 fn main() {
     let _ = (A, B, C, D);
diff --git a/src/test/compile-fail/const-err.rs b/src/test/compile-fail/const-err.rs
index b0cf639cd76..8bd759b6d37 100644
--- a/src/test/compile-fail/const-err.rs
+++ b/src/test/compile-fail/const-err.rs
@@ -23,9 +23,7 @@ fn black_box<T>(_: T) {
 // Make sure that the two uses get two errors.
 const FOO: u8 = [5u8][1];
 //~^ ERROR constant evaluation error
-//~| ERROR constant evaluation error
 //~| index out of bounds: the len is 1 but the index is 1
-//~| ERROR E0080
 
 fn main() {
     black_box((FOO, FOO));
diff --git a/src/test/compile-fail/const-eval-overflow2.rs b/src/test/compile-fail/const-eval-overflow2.rs
index d715847e03f..25787b7bb4b 100644
--- a/src/test/compile-fail/const-eval-overflow2.rs
+++ b/src/test/compile-fail/const-eval-overflow2.rs
@@ -22,65 +22,49 @@ use std::{i8, i16, i32, i64, isize};
 use std::{u8, u16, u32, u64, usize};
 
 const VALS_I8: (i8,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
     (
      i8::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I16: (i16,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
     (
      i16::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I32: (i32,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
     (
      i32::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I64: (i64,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
     (
      i64::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U8: (u8,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
     (
      u8::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U16: (u16,) = (
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
      u16::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U32: (u32,) = (
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
      u32::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U64: (u64,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to subtract with overflow
     (
      u64::MIN - 1,
+     //~^ ERROR constant evaluation error
      );
 
 fn main() {
diff --git a/src/test/compile-fail/const-eval-overflow2b.rs b/src/test/compile-fail/const-eval-overflow2b.rs
index f6463900eeb..d8332757b64 100644
--- a/src/test/compile-fail/const-eval-overflow2b.rs
+++ b/src/test/compile-fail/const-eval-overflow2b.rs
@@ -22,65 +22,49 @@ use std::{i8, i16, i32, i64, isize};
 use std::{u8, u16, u32, u64, usize};
 
 const VALS_I8: (i8,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
     (
      i8::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I16: (i16,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
     (
      i16::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I32: (i32,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
     (
      i32::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I64: (i64,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
     (
      i64::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U8: (u8,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
     (
      u8::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U16: (u16,) = (
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
      u16::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U32: (u32,) = (
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
      u32::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U64: (u64,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to add with overflow
     (
      u64::MAX + 1,
+     //~^ ERROR constant evaluation error
      );
 
 fn main() {
diff --git a/src/test/compile-fail/const-eval-overflow2c.rs b/src/test/compile-fail/const-eval-overflow2c.rs
index 8665b9d97a8..2a8e4dc2c34 100644
--- a/src/test/compile-fail/const-eval-overflow2c.rs
+++ b/src/test/compile-fail/const-eval-overflow2c.rs
@@ -22,65 +22,49 @@ use std::{i8, i16, i32, i64, isize};
 use std::{u8, u16, u32, u64, usize};
 
 const VALS_I8: (i8,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
     (
      i8::MIN * 2,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I16: (i16,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
     (
      i16::MIN * 2,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I32: (i32,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
     (
      i32::MIN * 2,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_I64: (i64,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
     (
      i64::MIN * 2,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U8: (u8,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
     (
      u8::MAX * 2,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U16: (u16,) = (
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
      u16::MAX * 2,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U32: (u32,) = (
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
      u32::MAX * 2,
+     //~^ ERROR constant evaluation error
      );
 
 const VALS_U64: (u64,) =
-     //~^ ERROR constant evaluation error
-     //~| ERROR constant evaluation error
-     //~| attempt to multiply with overflow
     (
      u64::MAX * 2,
+     //~^ ERROR constant evaluation error
      );
 
 fn main() {
diff --git a/src/test/compile-fail/const-slice-oob.rs b/src/test/compile-fail/const-slice-oob.rs
index cb884313f33..179ea9e853f 100644
--- a/src/test/compile-fail/const-slice-oob.rs
+++ b/src/test/compile-fail/const-slice-oob.rs
@@ -13,7 +13,6 @@
 const FOO: &'static[u32] = &[1, 2, 3];
 const BAR: u32 = FOO[5];
 //~^ ERROR constant evaluation error [E0080]
-//~| ERROR constant evaluation error [E0080]
 //~| index out of bounds: the len is 3 but the index is 5
 
 fn main() {