Fixes to compile-fail error messages post-rebase.
This commit is contained in:
parent
1f5e45b769
commit
1973f7ebe5
4 changed files with 12 additions and 3 deletions
|
@ -22,7 +22,8 @@ use std::{u8, u16, u32, u64, usize};
|
||||||
const A_I8_I
|
const A_I8_I
|
||||||
: [u32; (i8::MAX as usize) + 1]
|
: [u32; (i8::MAX as usize) + 1]
|
||||||
= [0; (i8::MAX + 1) as usize];
|
= [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() {
|
fn main() {
|
||||||
foo(&A_I8_I[..]);
|
foo(&A_I8_I[..]);
|
||||||
|
|
|
@ -27,6 +27,10 @@ const A_I8_I
|
||||||
: [u32; (i8::MAX as usize) + 1]
|
: [u32; (i8::MAX as usize) + 1]
|
||||||
= [0; (i8::MAX + 1u8) as usize];
|
= [0; (i8::MAX + 1u8) as usize];
|
||||||
//~^ ERROR mismatched types
|
//~^ 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() {
|
fn main() {
|
||||||
foo(&A_I8_I[..]);
|
foo(&A_I8_I[..]);
|
||||||
|
|
|
@ -22,6 +22,8 @@ use std::{u8, u16, u32, u64, usize};
|
||||||
const A_I8_T
|
const A_I8_T
|
||||||
: [u32; (i8::MAX as i8 + 1u8) as usize]
|
: [u32; (i8::MAX as i8 + 1u8) as usize]
|
||||||
//~^ ERROR mismatched types
|
//~^ 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];
|
= [0; (i8::MAX as usize) + 1];
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// error-pattern: too big for the current
|
|
||||||
#![allow(exceeding_bitshifts)]
|
#![allow(exceeding_bitshifts)]
|
||||||
|
|
||||||
fn main() {
|
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue