Fix parse-fail and compile-fail tests
This commit is contained in:
parent
d9eb756cbf
commit
db2527add3
@ -10,7 +10,7 @@
|
||||
|
||||
// Test spans of errors
|
||||
|
||||
const TUP: (usize,) = 5 << 64;
|
||||
const TUP: (usize,) = 5usize << 64;
|
||||
//~^ ERROR E0080
|
||||
//~| attempt to shift left with overflow
|
||||
const ARR: [i32; TUP.0] = [];
|
||||
|
@ -1,13 +0,0 @@
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
println!("{}", 18446744073709551616u64); //~ error: int literal is too large
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
// issue #17123
|
||||
|
||||
fn main() {
|
||||
100000000000000000000000000000000 //~ ERROR int literal is too large
|
||||
|
||||
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
//~^ ERROR int literal is too large
|
||||
; // the span shouldn't point to this.
|
||||
}
|
||||
|
@ -11,6 +11,6 @@
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let __isize = 18446744073709551616; // 2^64
|
||||
let __isize = 340282366920938463463374607431768211456; // 2^128
|
||||
//~^ ERROR int literal is too large
|
||||
}
|
||||
|
@ -11,6 +11,6 @@
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let __isize = 0xff_ffff_ffff_ffff_ffff;
|
||||
let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff;
|
||||
//~^ ERROR int literal is too large
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ fn main() {
|
||||
0o; //~ ERROR: no valid digits
|
||||
1e+; //~ ERROR: expected at least one digit in exponent
|
||||
0x539.0; //~ ERROR: hexadecimal float literal is not supported
|
||||
99999999999999999999999999999999; //~ ERROR: int literal is too large
|
||||
99999999999999999999999999999999; //~ ERROR: int literal is too large
|
||||
9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
|
||||
9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
|
||||
0x; //~ ERROR: no valid digits
|
||||
0xu32; //~ ERROR: no valid digits
|
||||
0ou32; //~ ERROR: no valid digits
|
||||
|
Loading…
Reference in New Issue
Block a user