1
Fork 0

Unify the const folding errors

before they differed depending on whether optimizations were on or not
This commit is contained in:
Oliver Schneider 2018-03-06 12:43:02 +01:00
parent edc5f73433
commit b5ace9a906
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
24 changed files with 279 additions and 156 deletions

View file

@ -10,7 +10,8 @@
const X: u32 = 5;
const Y: u32 = 6;
const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; //~ E0080
const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
//~^ WARN attempt to subtract with overflow
fn main() {
println!("{}", FOO); //~ E0080