2017-07-31 09:42:42 -05:00
|
|
|
const fn foo(x: u32) -> u32 {
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2020-01-08 14:31:08 -06:00
|
|
|
const X: u32 = 0 - 1;
|
2022-09-21 06:05:20 -05:00
|
|
|
//~^ ERROR constant
|
2020-01-08 14:31:08 -06:00
|
|
|
const Y: u32 = foo(0 - 1);
|
2022-09-21 06:05:20 -05:00
|
|
|
//~^ ERROR constant
|
2017-07-31 09:42:42 -05:00
|
|
|
println!("{} {}", X, Y);
|
|
|
|
}
|