summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/issue-64970.rs
blob: ba530438f9a1d223ac3495d92b4a5571ea60ab01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass

fn main() {
    foo(10);
}

fn foo(mut n: i32) {
    if false {
        n = 0i32;
    }

    if n > 0i32 {
        let _ = 1i32 / n;
    }
}