mirror of
https://git.proxmox.com/git/rustc
synced 2025-06-01 12:04:03 +00:00
12 lines
187 B
Rust
12 lines
187 B
Rust
const fn foo(x: u32) -> u32 {
|
|
x
|
|
}
|
|
|
|
fn main() {
|
|
const X: u32 = 0 - 1;
|
|
//~^ ERROR constant
|
|
const Y: u32 = foo(0 - 1);
|
|
//~^ ERROR constant
|
|
println!("{} {}", X, Y);
|
|
}
|