5 const fn foo(x: u32) -> u32 {
11 //~^ WARN any use of this value will cause
12 //~| WARN this was previously accepted by the compiler but is being phased out
13 const Y: u32 = foo(0 - 1);
14 //~^ WARN any use of this value will cause
15 //~| WARN this was previously accepted by the compiler but is being phased out
16 println!("{} {}", X, Y);
17 //~^ ERROR evaluation of constant value failed
18 //~| ERROR evaluation of constant value failed
19 //~| WARN erroneous constant used [const_err]
20 //~| WARN erroneous constant used [const_err]
21 //~| WARN this was previously accepted by the compiler but is being phased out
22 //~| WARN this was previously accepted by the compiler but is being phased out