]> git.proxmox.com Git - rustc.git/blame - tests/ui/consts/const-eval/issue-43197.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / consts / const-eval / issue-43197.rs
CommitLineData
3b2f2976
XL
1const fn foo(x: u32) -> u32 {
2 x
3}
4
5fn main() {
dfeec247 6 const X: u32 = 0 - 1;
2b03887a 7 //~^ ERROR constant
dfeec247 8 const Y: u32 = foo(0 - 1);
2b03887a 9 //~^ ERROR constant
3b2f2976 10 println!("{} {}", X, Y);
223e47cc 11}