Skip to content

Commit e1da77c

Browse files
committed
Also use mir::Offset for pointer add
1 parent 8bcfc0e commit e1da77c

File tree

11 files changed

+117
-77
lines changed

11 files changed

+117
-77
lines changed

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,15 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
819819
.builtin_deref(true)
820820
.unwrap_or_else(|| bug!("deref of non-pointer {:?}", input_ty))
821821
.ty;
822-
let llty = bx.cx().backend_type(bx.cx().layout_of(pointee_type));
823-
bx.inbounds_gep(llty, lhs, &[rhs])
822+
let pointee_layout = bx.cx().layout_of(pointee_type);
823+
if pointee_layout.is_zst() {
824+
// `Offset` works in terms of the size of pointee,
825+
// so offsetting a pointer to ZST is a noop.
826+
lhs
827+
} else {
828+
let llty = bx.cx().backend_type(pointee_layout);
829+
bx.inbounds_gep(llty, lhs, &[rhs])
830+
}
824831
}
825832
mir::BinOp::Shl => common::build_unchecked_lshift(bx, lhs, rhs),
826833
mir::BinOp::Shr => common::build_unchecked_rshift(bx, input_ty, lhs, rhs),

compiler/rustc_hir_analysis/src/check/intrinsic.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
215215

216216
sym::type_name => (1, Vec::new(), tcx.mk_static_str()),
217217
sym::type_id => (1, Vec::new(), tcx.types.u64),
218-
sym::offset | sym::arith_offset => (
218+
sym::offset => (2, vec![param(0), param(1)], param(0)),
219+
sym::arith_offset => (
219220
1,
220221
vec![
221222
tcx.mk_ptr(ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),

library/core/src/intrinsics.rs

+12
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,10 @@ extern "rust-intrinsic" {
14131413
/// This is implemented as an intrinsic to avoid converting to and from an
14141414
/// integer, since the conversion would throw away aliasing information.
14151415
///
1416+
/// This can only be used with `Ptr` as a raw pointer type (`*mut` or `*const`)
1417+
/// to a `Sized` pointee and with `Delta` as `usize` or `isize`. Any other
1418+
/// instantiations may arbitrarily misbehave, and that's *not* a compiler bug.
1419+
///
14161420
/// # Safety
14171421
///
14181422
/// Both the starting and resulting pointer must be either in bounds or one
@@ -1421,6 +1425,14 @@ extern "rust-intrinsic" {
14211425
/// returned value will result in undefined behavior.
14221426
///
14231427
/// The stabilized version of this intrinsic is [`pointer::offset`].
1428+
#[cfg(not(bootstrap))]
1429+
#[must_use = "returns a new pointer rather than modifying its argument"]
1430+
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
1431+
#[rustc_nounwind]
1432+
pub fn offset<Ptr, Delta>(dst: Ptr, offset: Delta) -> Ptr;
1433+
1434+
/// The bootstrap version of this is more restricted.
1435+
#[cfg(bootstrap)]
14241436
#[must_use = "returns a new pointer rather than modifying its argument"]
14251437
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
14261438
#[rustc_nounwind]

library/core/src/ptr/const_ptr.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,16 @@ impl<T: ?Sized> *const T {
916916
where
917917
T: Sized,
918918
{
919+
#[cfg(bootstrap)]
919920
// SAFETY: the caller must uphold the safety contract for `offset`.
920-
unsafe { self.offset(count as isize) }
921+
unsafe {
922+
self.offset(count as isize)
923+
}
924+
#[cfg(not(bootstrap))]
925+
// SAFETY: the caller must uphold the safety contract for `offset`.
926+
unsafe {
927+
intrinsics::offset(self, count)
928+
}
921929
}
922930

923931
/// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`).

library/core/src/ptr/mut_ptr.rs

+20-2
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,20 @@ impl<T: ?Sized> *mut T {
473473
where
474474
T: Sized,
475475
{
476+
#[cfg(bootstrap)]
476477
// SAFETY: the caller must uphold the safety contract for `offset`.
477478
// The obtained pointer is valid for writes since the caller must
478479
// guarantee that it points to the same allocated object as `self`.
479-
unsafe { intrinsics::offset(self, count) as *mut T }
480+
unsafe {
481+
intrinsics::offset(self, count) as *mut T
482+
}
483+
#[cfg(not(bootstrap))]
484+
// SAFETY: the caller must uphold the safety contract for `offset`.
485+
// The obtained pointer is valid for writes since the caller must
486+
// guarantee that it points to the same allocated object as `self`.
487+
unsafe {
488+
intrinsics::offset(self, count)
489+
}
480490
}
481491

482492
/// Calculates the offset from a pointer in bytes.
@@ -1016,8 +1026,16 @@ impl<T: ?Sized> *mut T {
10161026
where
10171027
T: Sized,
10181028
{
1029+
#[cfg(bootstrap)]
1030+
// SAFETY: the caller must uphold the safety contract for `offset`.
1031+
unsafe {
1032+
self.offset(count as isize)
1033+
}
1034+
#[cfg(not(bootstrap))]
10191035
// SAFETY: the caller must uphold the safety contract for `offset`.
1020-
unsafe { self.offset(count as isize) }
1036+
unsafe {
1037+
intrinsics::offset(self, count)
1038+
}
10211039
}
10221040

10231041
/// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`).

src/doc/unstable-book/src/language-features/intrinsics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ via a declaration like
2222
extern "rust-intrinsic" {
2323
fn transmute<T, U>(x: T) -> U;
2424

25-
fn offset<T>(dst: *const T, offset: isize) -> *const T;
25+
fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
2626
}
2727
```
2828

tests/codegen/intrinsics/offset.rs

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// compile-flags: -O -C no-prepopulate-passes
2+
// min-llvm-version: 15.0 (because we're using opaque pointers)
3+
4+
#![crate_type = "lib"]
5+
#![feature(core_intrinsics)]
6+
7+
use std::intrinsics::offset;
8+
9+
// CHECK-LABEL: ptr @offset_zst
10+
// CHECK-SAME: (ptr noundef %p, [[SIZE:i[0-9]+]] noundef %d)
11+
#[no_mangle]
12+
pub unsafe fn offset_zst(p: *const (), d: usize) -> *const () {
13+
// CHECK-NOT: getelementptr
14+
// CHECK: ret ptr %p
15+
offset(p, d)
16+
}
17+
18+
// CHECK-LABEL: ptr @offset_isize
19+
// CHECK-SAME: (ptr noundef %p, [[SIZE]] noundef %d)
20+
#[no_mangle]
21+
pub unsafe fn offset_isize(p: *const u32, d: isize) -> *const u32 {
22+
// CHECK: %[[R:.*]] = getelementptr inbounds i32, ptr %p, [[SIZE]] %d
23+
// CHECK-NEXT: ret ptr %[[R]]
24+
offset(p, d)
25+
}
26+
27+
// CHECK-LABEL: ptr @offset_usize
28+
// CHECK-SAME: (ptr noundef %p, [[SIZE]] noundef %d)
29+
#[no_mangle]
30+
pub unsafe fn offset_usize(p: *const u64, d: usize) -> *const u64 {
31+
// CHECK: %[[R:.*]] = getelementptr inbounds i64, ptr %p, [[SIZE]] %d
32+
// CHECK-NEXT: ret ptr %[[R]]
33+
offset(p, d)
34+
}

tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
_3 = _1; // scope 0 at $DIR/lower_intrinsics.rs:+1:30: +1:31
1414
StorageLive(_4); // scope 0 at $DIR/lower_intrinsics.rs:+1:33: +1:34
1515
_4 = _2; // scope 0 at $DIR/lower_intrinsics.rs:+1:33: +1:34
16-
- _0 = offset::<i32>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
16+
- _0 = offset::<*const i32, isize>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
1717
- // mir::Constant
1818
- // + span: $DIR/lower_intrinsics.rs:140:5: 140:29
19-
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32, isize) -> *const i32 {offset::<i32>}, val: Value(<ZST>) }
19+
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32, isize) -> *const i32 {offset::<*const i32, isize>}, val: Value(<ZST>) }
2020
+ _0 = Offset(move _3, move _4); // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
2121
+ goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
2222
}

tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir

+1-19
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,7 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
4545
scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
4646
debug self => _9; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
4747
debug count => _2; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
48-
let mut _13: isize; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
4948
scope 13 {
50-
scope 14 (inlined ptr::mut_ptr::<impl *mut u32>::offset) { // at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
51-
debug self => _9; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
52-
debug count => _13; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
53-
let mut _14: *const u32; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
54-
let mut _15: *const u32; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
55-
scope 15 {
56-
}
57-
}
5849
}
5950
}
6051
}
@@ -86,16 +77,7 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
8677
StorageLive(_12); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
8778
StorageLive(_9); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
8879
_9 = _8 as *mut u32 (PtrToPtr); // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
89-
StorageLive(_13); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
90-
_13 = _2 as isize (IntToInt); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
91-
StorageLive(_14); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
92-
StorageLive(_15); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
93-
_15 = _9 as *const u32 (Pointer(MutToConstPointer)); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
94-
_14 = Offset(move _15, _13); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
95-
StorageDead(_15); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
96-
_7 = move _14 as *mut u32 (PtrToPtr); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
97-
StorageDead(_14); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
98-
StorageDead(_13); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
80+
_7 = Offset(_9, _2); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
9981
StorageDead(_9); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
10082
StorageDead(_12); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
10183
StorageDead(_11); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL

tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir

+27-45
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,23 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
3434
scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
3535
debug self => _10; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
3636
debug count => _11; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
37-
let mut _16: isize; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
3837
scope 13 {
39-
scope 14 (inlined ptr::mut_ptr::<impl *mut u32>::offset) { // at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
40-
debug self => _10; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
41-
debug count => _16; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
42-
let mut _17: *const u32; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
43-
let mut _18: *const u32; // in scope 14 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
44-
scope 15 {
45-
}
46-
}
4738
}
4839
}
49-
scope 16 (inlined slice_from_raw_parts_mut::<u32>) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
50-
debug data => _9; // in scope 16 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
51-
debug len => _12; // in scope 16 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
52-
let mut _19: *mut (); // in scope 16 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
53-
scope 17 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
54-
debug self => _9; // in scope 17 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
40+
scope 14 (inlined slice_from_raw_parts_mut::<u32>) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
41+
debug data => _9; // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
42+
debug len => _12; // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
43+
let mut _16: *mut (); // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
44+
scope 15 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
45+
debug self => _9; // in scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
5546
}
56-
scope 18 (inlined std::ptr::from_raw_parts_mut::<[u32]>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
57-
debug data_address => _19; // in scope 18 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
58-
debug metadata => _12; // in scope 18 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
59-
let mut _20: std::ptr::metadata::PtrRepr<[u32]>; // in scope 18 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
60-
let mut _21: std::ptr::metadata::PtrComponents<[u32]>; // in scope 18 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
61-
let mut _22: *const (); // in scope 18 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
62-
scope 19 {
47+
scope 16 (inlined std::ptr::from_raw_parts_mut::<[u32]>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
48+
debug data_address => _16; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
49+
debug metadata => _12; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
50+
let mut _17: std::ptr::metadata::PtrRepr<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
51+
let mut _18: std::ptr::metadata::PtrComponents<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
52+
let mut _19: *const (); // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
53+
scope 17 {
6354
}
6455
}
6556
}
@@ -110,33 +101,24 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
110101
_10 = _4 as *mut u32 (PtrToPtr); // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
111102
StorageLive(_11); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
112103
_11 = (_2.0: usize); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
113-
StorageLive(_16); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
114-
_16 = _11 as isize (IntToInt); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
115-
StorageLive(_17); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
116-
StorageLive(_18); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
117-
_18 = _10 as *const u32 (Pointer(MutToConstPointer)); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
118-
_17 = Offset(move _18, _16); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
119-
StorageDead(_18); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
120-
_9 = move _17 as *mut u32 (PtrToPtr); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
121-
StorageDead(_17); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
122-
StorageDead(_16); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
104+
_9 = Offset(_10, _11); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
123105
StorageDead(_11); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
124106
StorageDead(_10); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
125107
StorageLive(_12); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
126108
_12 = _6; // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
127-
StorageLive(_19); // scope 16 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
128-
_19 = _9 as *mut () (PtrToPtr); // scope 17 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
129-
StorageLive(_20); // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
130-
StorageLive(_21); // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
131-
StorageLive(_22); // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
132-
_22 = _19 as *const () (Pointer(MutToConstPointer)); // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
133-
_21 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _22, metadata: _12 }; // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
134-
StorageDead(_22); // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
135-
_20 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _21 }; // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
136-
StorageDead(_21); // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
137-
_3 = (_20.1: *mut [u32]); // scope 19 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
138-
StorageDead(_20); // scope 18 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
139-
StorageDead(_19); // scope 16 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
109+
StorageLive(_16); // scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
110+
_16 = _9 as *mut () (PtrToPtr); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
111+
StorageLive(_17); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
112+
StorageLive(_18); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
113+
StorageLive(_19); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
114+
_19 = _16 as *const () (Pointer(MutToConstPointer)); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
115+
_18 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _19, metadata: _12 }; // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
116+
StorageDead(_19); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
117+
_17 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _18 }; // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
118+
StorageDead(_18); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
119+
_3 = (_17.1: *mut [u32]); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
120+
StorageDead(_17); // scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
121+
StorageDead(_16); // scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
140122
StorageDead(_12); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
141123
StorageDead(_9); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
142124
StorageDead(_6); // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL

0 commit comments

Comments
 (0)