Switch from error patterns to //~ ERROR
markers.
AFAICT, we do not have the same const-eval issues that we used to when rust-lang/rust#23926 was filed. (Probably because of the switch to miri for const-evaluation.)
This commit is contained in:
parent
e555854f9d
commit
b72ba0559c
2 changed files with 11 additions and 8 deletions
|
@ -3,11 +3,11 @@
|
||||||
//
|
//
|
||||||
// This test is checking the count in an array expression.
|
// This test is checking the count in an array expression.
|
||||||
|
|
||||||
// FIXME (#23926): the error output is not consistent between a
|
|
||||||
// self-hosted and a cross-compiled setup; therefore resorting to
|
|
||||||
// error-pattern for now.
|
|
||||||
|
|
||||||
// error-pattern: attempt to add with overflow
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#![allow(unused_imports)]
|
#![allow(unused_imports)]
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ 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 evaluation of constant value failed
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
foo(&A_I8_I[..]);
|
foo(&A_I8_I[..]);
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
// types for the left- and right-hand sides of the addition do not
|
// types for the left- and right-hand sides of the addition do not
|
||||||
// match (as well as overflow).
|
// match (as well as overflow).
|
||||||
|
|
||||||
// FIXME (#23926): the error output is not consistent between a
|
|
||||||
// self-hosted and a cross-compiled setup; therefore resorting to
|
|
||||||
// error-pattern for now.
|
|
||||||
|
|
||||||
// error-pattern: mismatched types
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#![allow(unused_imports)]
|
#![allow(unused_imports)]
|
||||||
|
|
||||||
|
@ -22,6 +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 + 1u8) as usize];
|
= [0; (i8::MAX + 1u8) as usize];
|
||||||
|
//~^ ERROR mismatched types
|
||||||
|
//~| ERROR cannot add `u8` to `i8`
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
foo(&A_I8_I[..]);
|
foo(&A_I8_I[..]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue