fork/rust

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

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

master
1.6 KiB76 linesraw
1// MIR for `vec_move` after PreCodegen
2
3fn vec_move(_1: Vec<impl Sized>) -> () {
4    debug v => _1;
5    let mut _0: ();
6    let mut _2: std::vec::IntoIter<impl Sized>;
7    let mut _3: std::vec::IntoIter<impl Sized>;
8    let mut _4: &mut std::vec::IntoIter<impl Sized>;
9    let mut _5: std::option::Option<impl Sized>;
10    let mut _6: isize;
11    let _8: ();
12    scope 1 {
13        debug iter => _3;
14        let _7: impl Sized;
15        scope 2 {
16            debug x => _7;
17        }
18    }
19
20    bb0: {
21        StorageLive(_2);
22        _2 = <Vec<impl Sized> as IntoIterator>::into_iter(move _1) -> [return: bb1, unwind continue];
23    }
24
25    bb1: {
26        StorageLive(_3);
27        _3 = move _2;
28        goto -> bb2;
29    }
30
31    bb2: {
32        StorageLive(_5);
33        StorageLive(_4);
34        _4 = &mut _3;
35        _5 = <std::vec::IntoIter<impl Sized> as Iterator>::next(move _4) -> [return: bb3, unwind: bb9];
36    }
37
38    bb3: {
39        StorageDead(_4);
40        _6 = discriminant(_5);
41        switchInt(move _6) -> [0: bb4, 1: bb6, otherwise: bb8];
42    }
43
44    bb4: {
45        StorageDead(_5);
46        drop(_3) -> [return: bb5, unwind continue];
47    }
48
49    bb5: {
50        StorageDead(_3);
51        StorageDead(_2);
52        return;
53    }
54
55    bb6: {
56        _7 = move ((_5 as Some).0: impl Sized);
57        _8 = opaque::<impl Sized>(move _7) -> [return: bb7, unwind: bb9];
58    }
59
60    bb7: {
61        StorageDead(_5);
62        goto -> bb2;
63    }
64
65    bb8: {
66        unreachable;
67    }
68
69    bb9 (cleanup): {
70        drop(_3) -> [return: bb10, unwind terminate(cleanup)];
71    }
72
73    bb10 (cleanup): {
74        resume;
75    }
76}