Skip to content

Commit 3de7aaf

Browse files
authored
Rollup merge of rust-lang#58648 - pnkfelix:issue-23926-update-tests, r=nikomatsakis
Update tests to account for cross-platform testing and miri. Fix rust-lang#23926
2 parents 9c99d3e + b72ba05 commit 3de7aaf

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
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[..]);

src/test/ui/huge-array-simple.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
// FIXME (#23926): the error output is not consistent between a
2-
// self-hosted and a cross-compiled setup. Skipping for now.
3-
4-
// ignore-test FIXME(#23926)
1+
// error-pattern: too big for the current architecture
52

3+
// normalize-stderr-test "; \d+]" -> "; N]"
64
#![allow(exceeding_bitshifts)]
75

6+
#[cfg(target_pointer_width = "64")]
87
fn main() {
98
let _fat : [u8; (1<<61)+(1<<31)] =
109
[0; (1u64<<61) as usize +(1u64<<31) as usize];
1110
}
11+
12+
#[cfg(target_pointer_width = "32")]
13+
fn main() {
14+
let _fat : [u8; (1<<31)+(1<<15)] =
15+
[0; (1u32<<31) as usize +(1u32<<15) as usize];
16+
}

src/test/ui/huge-array-simple.stderr

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: the type `[u8; N]` is too big for the current architecture
2+
3+
error: aborting due to previous error
4+

0 commit comments

Comments
 (0)