Unify the const folding errors
before they differed depending on whether optimizations were on or not
This commit is contained in:
parent
edc5f73433
commit
b5ace9a906
24 changed files with 279 additions and 156 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue