Report const eval error inside the query
This commit is contained in:
parent
3476ac0bee
commit
7fdf06cdde
135 changed files with 1472 additions and 1090 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue