From 249d3e9dd943e68d80f5a0d779aa7ab75dd536ef Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 5 Apr 2022 13:13:21 +0000 Subject: [PATCH] Use WrappingRange::full instead of hand-rolling it --- src/consts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/consts.rs b/src/consts.rs index 805a265226da..3dc456f1aa0e 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -328,7 +328,7 @@ pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAl interpret::Pointer::new(alloc_id, Size::from_bytes(ptr_offset)), &cx.tcx, ), - abi::Scalar::Initialized { value: Primitive::Pointer, valid_range: WrappingRange { start: 0, end: !0 } }, + abi::Scalar::Initialized { value: Primitive::Pointer, valid_range: WrappingRange::full(dl.pointer_size) }, cx.type_i8p(), )); next_offset = offset + pointer_size;