1
Fork 0

make const_err a future incompat lint

This commit is contained in:
Ralf Jung 2021-01-30 14:49:22 +01:00
parent d6a28a97e6
commit 8477d352ac
107 changed files with 961 additions and 270 deletions

View file

@ -6,9 +6,11 @@ const X: u32 = 5;
const Y: u32 = 6;
const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
//~^ WARN any use of this value will cause an error
//~| WARN this was previously accepted by the compiler but is being phased out
fn main() {
println!("{}", FOO);
//~^ ERROR
//~| WARN erroneous constant used [const_err]
//~| WARN this was previously accepted by the compiler but is being phased out
}