blob: 3f0d60b46f48b28d6e3279f11033731015858826 (
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
|
// MIR for `vec_deref_to_slice` after PreCodegen
fn vec_deref_to_slice(_1: &Vec<u8>) -> &[u8] {
debug v => _1;
let mut _0: &[u8];
scope 1 (inlined <Vec<u8> as Deref>::deref) {
debug self => _1;
scope 2 (inlined Vec::<u8>::as_slice) {
debug self => _1;
let mut _7: *const u8;
let mut _8: usize;
scope 3 (inlined Vec::<u8>::as_ptr) {
debug self => _1;
let mut _6: *mut u8;
scope 4 (inlined alloc::raw_vec::RawVec::<u8>::ptr) {
scope 5 (inlined alloc::raw_vec::RawVecInner::ptr::<u8>) {
let mut _5: std::ptr::NonNull<u8>;
scope 6 (inlined alloc::raw_vec::RawVecInner::non_null::<u8>) {
let mut _2: std::ptr::NonNull<u8>;
scope 7 (inlined Unique::<u8>::cast::<u8>) {
scope 8 (inlined NonNull::<u8>::cast::<u8>) {
let mut _3: *mut u8;
let mut _4: *const u8;
scope 9 (inlined NonNull::<u8>::as_ptr) {
}
}
}
scope 10 (inlined Unique::<u8>::as_non_null_ptr) {
}
}
scope 11 (inlined NonNull::<u8>::as_ptr) {
}
}
}
}
scope 12 (inlined std::slice::from_raw_parts::<'_, u8>) {
debug data => _7;
debug len => _8;
let _9: *const [u8];
scope 13 (inlined core::ub_checks::check_language_ub) {
scope 14 (inlined core::ub_checks::check_language_ub::runtime) {
}
}
scope 15 (inlined std::mem::size_of::<u8>) {
}
scope 16 (inlined align_of::<u8>) {
}
scope 17 (inlined slice_from_raw_parts::<u8>) {
debug data => _7;
debug len => _8;
scope 18 (inlined std::ptr::from_raw_parts::<[u8], u8>) {
debug data_pointer => _7;
}
}
}
}
}
bb0: {
StorageLive(_6);
StorageLive(_7);
StorageLive(_5);
StorageLive(_2);
_2 = copy (((((*_1).0: alloc::raw_vec::RawVec<u8>).0: alloc::raw_vec::RawVecInner).0: std::ptr::Unique<u8>).0: std::ptr::NonNull<u8>);
StorageLive(_3);
StorageLive(_4);
_3 = copy _2 as *mut u8 (Transmute);
_4 = copy _3 as *const u8 (PtrToPtr);
_5 = NonNull::<u8> { pointer: move _4 };
StorageDead(_4);
StorageDead(_3);
StorageDead(_2);
_6 = copy _5 as *mut u8 (Transmute);
StorageDead(_5);
_7 = copy _6 as *const u8 (PtrToPtr);
StorageLive(_8);
_8 = copy ((*_1).1: usize);
StorageLive(_9);
_9 = *const [u8] from (copy _7, copy _8);
_0 = &(*_9);
StorageDead(_9);
StorageDead(_8);
StorageDead(_7);
StorageDead(_6);
return;
}
}
|