diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-04-01 00:15:09 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-04-01 02:56:08 +0200 |
| commit | 1973f7ebe5c67ef9ed57f7a64781d13868a70d3d (patch) | |
| tree | b4699326b03d8cc173746f5174aa8ee7db5a808f | |
| parent | 1f5e45b76961d54e3b825c3c6af6b6e02504d2be (diff) | |
| download | rust-1973f7ebe5c67ef9ed57f7a64781d13868a70d3d.tar.gz rust-1973f7ebe5c67ef9ed57f7a64781d13868a70d3d.zip | |
Fixes to compile-fail error messages post-rebase.
| -rw-r--r-- | src/test/compile-fail/const-eval-overflow-3.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/const-eval-overflow-3b.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/const-eval-overflow-4b.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/huge-array-simple.rs | 6 |
4 files changed, 12 insertions, 3 deletions
diff --git a/src/test/compile-fail/const-eval-overflow-3.rs b/src/test/compile-fail/const-eval-overflow-3.rs index df03324e1f7..7d84562c6bd 100644 --- a/src/test/compile-fail/const-eval-overflow-3.rs +++ b/src/test/compile-fail/const-eval-overflow-3.rs @@ -22,7 +22,8 @@ use std::{u8, u16, u32, u64, usize}; const A_I8_I : [u32; (i8::MAX as usize) + 1] = [0; (i8::MAX + 1) as usize]; -//~^ ERROR error evaluating count: attempted to add with overflow +//~^ ERROR mismatched types +//~| ERROR expected constant integer for repeat count, but attempted to add with overflow fn main() { foo(&A_I8_I[..]); diff --git a/src/test/compile-fail/const-eval-overflow-3b.rs b/src/test/compile-fail/const-eval-overflow-3b.rs index 31dcb483c4a..950620fe019 100644 --- a/src/test/compile-fail/const-eval-overflow-3b.rs +++ b/src/test/compile-fail/const-eval-overflow-3b.rs @@ -27,6 +27,10 @@ const A_I8_I : [u32; (i8::MAX as usize) + 1] = [0; (i8::MAX + 1u8) as usize]; //~^ ERROR mismatched types +//~| ERROR mismatched types +//~| ERROR expected constant integer for repeat count, but attempted to add with overflow +//~| ERROR the trait `core::ops::Add<u8>` is not implemented for the type `i8` +//~| ERROR the trait `core::ops::Add<u8>` is not implemented for the type `i8` fn main() { foo(&A_I8_I[..]); diff --git a/src/test/compile-fail/const-eval-overflow-4b.rs b/src/test/compile-fail/const-eval-overflow-4b.rs index ca354ad78ea..6322b56a82f 100644 --- a/src/test/compile-fail/const-eval-overflow-4b.rs +++ b/src/test/compile-fail/const-eval-overflow-4b.rs @@ -22,6 +22,8 @@ use std::{u8, u16, u32, u64, usize}; const A_I8_T : [u32; (i8::MAX as i8 + 1u8) as usize] //~^ ERROR mismatched types + //~| the trait `core::ops::Add<u8>` is not implemented for the type `i8` + //~| the trait `core::ops::Add<u8>` is not implemented for the type `i8` = [0; (i8::MAX as usize) + 1]; fn main() { diff --git a/src/test/compile-fail/huge-array-simple.rs b/src/test/compile-fail/huge-array-simple.rs index 105f885f287..e6446304177 100644 --- a/src/test/compile-fail/huge-array-simple.rs +++ b/src/test/compile-fail/huge-array-simple.rs @@ -8,9 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: too big for the current #![allow(exceeding_bitshifts)] fn main() { - let fat : [u8; (1<<61)+(1<<31)] = [0; (1u64<<61) as usize +(1u64<<31) as usize]; + let fat : [u8; (1<<61)+(1<<31)] = + //~^ ERROR array length constant evaluation error: attempted left shift with overflow + [0; (1u64<<61) as usize +(1u64<<31) as usize]; + //~^ ERROR expected constant integer for repeat count, but attempted left shift with overflow } |
