blob: c1f874c079cb53a25f34816842bcc4a9d3064c18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// compile-flags: -O
#![deny(overflowing_literals)]
#![deny(const_err)]
fn main() {
let x2: i8 = --128; //~ ERROR literal out of range for `i8`
let x = -3.40282357e+38_f32; //~ ERROR literal out of range for `f32`
let x = 3.40282357e+38_f32; //~ ERROR literal out of range for `f32`
let x = -1.7976931348623159e+308_f64; //~ ERROR literal out of range for `f64`
let x = 1.7976931348623159e+308_f64; //~ ERROR literal out of range for `f64`
}
|