blob: 43efe034de53a9011398bed630cd8809ea69aa50 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
// MIR for `slice_get_mut_usize` after PreCodegen
fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
debug slice => _1;
debug index => _2;
let mut _0: std::option::Option<&mut u32>;
scope 1 (inlined core::slice::<impl [u32]>::get_mut::<usize>) {
debug self => _1;
debug index => _2;
scope 2 (inlined <usize as SliceIndex<[u32]>>::get_mut) {
debug self => _2;
debug slice => _1;
let mut _3: &[u32];
let mut _4: usize;
let mut _5: bool;
let mut _6: *mut [u32];
let mut _8: *mut u32;
let mut _9: &mut u32;
scope 3 {
scope 4 (inlined <usize as SliceIndex<[u32]>>::get_unchecked_mut) {
debug self => _2;
debug slice => _6;
let mut _7: *mut u32;
let mut _10: usize;
let mut _11: *mut [u32];
scope 5 {
debug this => _2;
scope 6 {
scope 7 (inlined <usize as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) {
debug this => _10;
debug slice => _11;
scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
debug self => _11;
let mut _12: *const [u32];
scope 9 (inlined std::ptr::metadata::<[u32]>) {
debug ptr => _12;
scope 10 {
}
}
}
}
scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
debug self => _6;
}
scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
debug self => _7;
debug count => _2;
scope 13 {
}
}
}
}
}
}
}
}
bb0: {
StorageLive(_9);
StorageLive(_5);
StorageLive(_4);
StorageLive(_3);
_3 = &(*_1);
_4 = Len((*_3));
StorageDead(_3);
_5 = Lt(_2, move _4);
StorageDead(_4);
switchInt(move _5) -> [0: bb1, otherwise: bb2];
}
bb1: {
_0 = const Option::<&mut u32>::None;
goto -> bb3;
}
bb2: {
StorageLive(_8);
StorageLive(_6);
_6 = &raw mut (*_1);
StorageLive(_10);
StorageLive(_11);
StorageLive(_12);
StorageLive(_7);
_7 = _6 as *mut u32 (PtrToPtr);
_8 = Offset(_7, _2);
StorageDead(_7);
StorageDead(_12);
StorageDead(_11);
StorageDead(_10);
StorageDead(_6);
_9 = &mut (*_8);
_0 = Option::<&mut u32>::Some(_9);
StorageDead(_8);
goto -> bb3;
}
bb3: {
StorageDead(_5);
StorageDead(_9);
return;
}
}
|