1
Fork 0

Report const eval error inside the query

This commit is contained in:
Oliver Schneider 2018-08-26 15:19:34 +02:00 committed by Oliver Scherer
parent 3476ac0bee
commit 7fdf06cdde
135 changed files with 1472 additions and 1090 deletions

View file

@ -13,10 +13,9 @@
const X: u32 = 5;
const Y: u32 = 6;
const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
//~^ WARN this constant cannot be used
//~^ WARN any use of this value will cause an error
fn main() {
println!("{}", FOO);
//~^ ERROR
//~| ERROR
}