Skip to content

Commit ae1849b

Browse files
committed
---
yaml --- r: 195522 b: refs/heads/master c: 1973f7e h: refs/heads/master v: v3
1 parent 371b891 commit ae1849b

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 1f5e45b76961d54e3b825c3c6af6b6e02504d2be
2+
refs/heads/master: 1973f7ebe5c67ef9ed57f7a64781d13868a70d3d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b3317d68910900f135f9f38e43a7a699bc736b4a
55
refs/heads/try: 961e0358e1a5c0faaef606e31e9965742c1643bf

trunk/src/test/compile-fail/const-eval-overflow-3.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +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 + 1) as usize];
25-
//~^ ERROR error evaluating count: attempted to add with overflow
25+
//~^ ERROR mismatched types
26+
//~| ERROR expected constant integer for repeat count, but attempted to add with overflow
2627

2728
fn main() {
2829
foo(&A_I8_I[..]);

trunk/src/test/compile-fail/const-eval-overflow-3b.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const A_I8_I
2727
: [u32; (i8::MAX as usize) + 1]
2828
= [0; (i8::MAX + 1u8) as usize];
2929
//~^ ERROR mismatched types
30+
//~| ERROR mismatched types
31+
//~| ERROR expected constant integer for repeat count, but attempted to add with overflow
32+
//~| ERROR the trait `core::ops::Add<u8>` is not implemented for the type `i8`
33+
//~| ERROR the trait `core::ops::Add<u8>` is not implemented for the type `i8`
3034

3135
fn main() {
3236
foo(&A_I8_I[..]);

trunk/src/test/compile-fail/const-eval-overflow-4b.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ use std::{u8, u16, u32, u64, usize};
2222
const A_I8_T
2323
: [u32; (i8::MAX as i8 + 1u8) as usize]
2424
//~^ ERROR mismatched types
25+
//~| the trait `core::ops::Add<u8>` is not implemented for the type `i8`
26+
//~| the trait `core::ops::Add<u8>` is not implemented for the type `i8`
2527
= [0; (i8::MAX as usize) + 1];
2628

2729
fn main() {

trunk/src/test/compile-fail/huge-array-simple.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: too big for the current
1211
#![allow(exceeding_bitshifts)]
1312

1413
fn main() {
15-
let fat : [u8; (1<<61)+(1<<31)] = [0; (1u64<<61) as usize +(1u64<<31) as usize];
14+
let fat : [u8; (1<<61)+(1<<31)] =
15+
//~^ ERROR array length constant evaluation error: attempted left shift with overflow
16+
[0; (1u64<<61) as usize +(1u64<<31) as usize];
17+
//~^ ERROR expected constant integer for repeat count, but attempted left shift with overflow
1618
}

0 commit comments

Comments
 (0)