blob: b5e39e632476ce65364dd58f29b568e24b2112d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
- // MIR for `enums` before ScalarReplacementOfAggregates
+ // MIR for `enums` after ScalarReplacementOfAggregates
fn enums(_1: usize) -> usize {
debug a => _1;
let mut _0: usize;
let mut _2: std::option::Option<usize>;
let mut _3: usize;
let mut _4: isize;
scope 1 {
debug a => _5;
let _5: usize;
}
bb0: {
StorageLive(_2);
StorageLive(_3);
_3 = _1;
_2 = Option::<usize>::Some(move _3);
StorageDead(_3);
_4 = discriminant(_2);
switchInt(move _4) -> [1: bb1, otherwise: bb2];
}
bb1: {
StorageLive(_5);
_5 = ((_2 as Some).0: usize);
_0 = _5;
StorageDead(_5);
goto -> bb3;
}
bb2: {
_0 = const 0_usize;
goto -> bb3;
}
bb3: {
StorageDead(_2);
return;
}
}
|