Skip to content

Commit 7f2b605

Browse files
committed
Fix parse-fail and compile-fail tests
1 parent bcfb368 commit 7f2b605

File tree

6 files changed

+7
-20
lines changed

6 files changed

+7
-20
lines changed

src/test/compile-fail/const-tup-index-span.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Test spans of errors
1212

13-
const TUP: (usize,) = 5 << 64;
13+
const TUP: (usize,) = 5usize << 64;
1414
//~^ ERROR E0080
1515
//~| attempt to shift left with overflow
1616
const ARR: [i32; TUP.0] = [];

src/test/compile-fail/oversized-literal.rs

-13
This file was deleted.

src/test/parse-fail/int-literal-too-large-span.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// issue #17123
1414

1515
fn main() {
16-
100000000000000000000000000000000 //~ ERROR int literal is too large
17-
16+
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
17+
//~^ ERROR int literal is too large
1818
; // the span shouldn't point to this.
1919
}

src/test/parse-fail/issue-5544-a.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
// compile-flags: -Z parse-only
1212

1313
fn main() {
14-
let __isize = 18446744073709551616; // 2^64
14+
let __isize = 340282366920938463463374607431768211456; // 2^128
1515
//~^ ERROR int literal is too large
1616
}

src/test/parse-fail/issue-5544-b.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
// compile-flags: -Z parse-only
1212

1313
fn main() {
14-
let __isize = 0xff_ffff_ffff_ffff_ffff;
14+
let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff;
1515
//~^ ERROR int literal is too large
1616
}

src/test/parse-fail/lex-bad-numeric-literals.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ fn main() {
2323
0o; //~ ERROR: no valid digits
2424
1e+; //~ ERROR: expected at least one digit in exponent
2525
0x539.0; //~ ERROR: hexadecimal float literal is not supported
26-
99999999999999999999999999999999; //~ ERROR: int literal is too large
27-
99999999999999999999999999999999; //~ ERROR: int literal is too large
26+
9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
27+
9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
2828
0x; //~ ERROR: no valid digits
2929
0xu32; //~ ERROR: no valid digits
3030
0ou32; //~ ERROR: no valid digits

0 commit comments

Comments
 (0)