Skip to content

Commit 249d3e9

Browse files
committed
Use WrappingRange::full instead of hand-rolling it
1 parent d71f633 commit 249d3e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAl
328328
interpret::Pointer::new(alloc_id, Size::from_bytes(ptr_offset)),
329329
&cx.tcx,
330330
),
331-
abi::Scalar::Initialized { value: Primitive::Pointer, valid_range: WrappingRange { start: 0, end: !0 } },
331+
abi::Scalar::Initialized { value: Primitive::Pointer, valid_range: WrappingRange::full(dl.pointer_size) },
332332
cx.type_i8p(),
333333
));
334334
next_offset = offset + pointer_size;

0 commit comments

Comments
 (0)