fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1023 B45 linesraw
1// WARNING: This output format is intended for human consumers only
2// and is subject to change without notice. Knock yourself out.
3fn foo() -> i32 {
4    let mut _0: i32;
5    let mut _1: (i32, bool);
6
7    bb0: {
8        _1 = CheckedAdd(const 5_i32, const 6_i32);
9        assert(!move (_1.1: bool), "attempt to compute `{} + {}`, which would overflow", const 5_i32, const 6_i32) -> [success: bb1, unwind continue];
10    }
11
12    bb1: {
13        _0 = move (_1.0: i32);
14        return;
15    }
16}
17
18// MIR FOR CTFE
19fn foo() -> i32 {
20    let mut _0: i32;
21    let mut _1: (i32, bool);
22
23    bb0: {
24        _1 = CheckedAdd(const 5_i32, const 6_i32);
25        assert(!move (_1.1: bool), "attempt to compute `{} + {}`, which would overflow", const 5_i32, const 6_i32) -> [success: bb1, unwind continue];
26    }
27
28    bb1: {
29        _0 = move (_1.0: i32);
30        return;
31    }
32}
33
34fn main() -> () {
35    let mut _0: ();
36    let _1: i32;
37
38    bb0: {
39        _1 = foo() -> [return: bb1, unwind continue];
40    }
41
42    bb1: {
43        return;
44    }
45}