Fixes to compile-fail error messages post-rebase.

This commit is contained in:
Felix S. Klock II 2015-04-01 00:15:09 +02:00
parent 1f5e45b769
commit 1973f7ebe5
4 changed files with 12 additions and 3 deletions

View file

@ -22,7 +22,8 @@
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[..]);

View file

@ -27,6 +27,10 @@
: [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[..]);

View file

@ -22,6 +22,8 @@
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() {

View file

@ -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
}