summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/issue-43197.rs
blob: 145463f0ae29816fbfa93d422293a6674450ad9d (plain)
1
2
3
4
5
6
7
8
9
10
11
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);
}