Skip to content

Commit b72ba05

Browse files
committed
Switch from error patterns to //~ ERROR markers.
AFAICT, we do not have the same const-eval issues that we used to when #23926 was filed. (Probably because of the switch to miri for const-evaluation.)
1 parent e555854 commit b72ba05

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/test/ui/consts/const-eval/const-eval-overflow-3.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
//
44
// This test is checking the count in an array expression.
55

6-
// FIXME (#23926): the error output is not consistent between a
7-
// self-hosted and a cross-compiled setup; therefore resorting to
8-
// error-pattern for now.
96

10-
// error-pattern: attempt to add with overflow
7+
8+
9+
10+
1111

1212
#![allow(unused_imports)]
1313

@@ -18,6 +18,7 @@ use std::{u8, u16, u32, u64, usize};
1818
const A_I8_I
1919
: [u32; (i8::MAX as usize) + 1]
2020
= [0; (i8::MAX + 1) as usize];
21+
//~^ ERROR evaluation of constant value failed
2122

2223
fn main() {
2324
foo(&A_I8_I[..]);

src/test/ui/consts/const-eval/const-eval-overflow-3b.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
// types for the left- and right-hand sides of the addition do not
88
// match (as well as overflow).
99

10-
// FIXME (#23926): the error output is not consistent between a
11-
// self-hosted and a cross-compiled setup; therefore resorting to
12-
// error-pattern for now.
1310

14-
// error-pattern: mismatched types
11+
12+
13+
14+
1515

1616
#![allow(unused_imports)]
1717

@@ -22,6 +22,8 @@ use std::{u8, u16, u32, u64, usize};
2222
const A_I8_I
2323
: [u32; (i8::MAX as usize) + 1]
2424
= [0; (i8::MAX + 1u8) as usize];
25+
//~^ ERROR mismatched types
26+
//~| ERROR cannot add `u8` to `i8`
2527

2628
fn main() {
2729
foo(&A_I8_I[..]);

0 commit comments

Comments
 (0)