From d57b7559090266fc0db2616bcfe8286739ee131d Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 5 Apr 2022 13:13:21 +0000 Subject: Use WrappingRange::full instead of hand-rolling it --- compiler/rustc_codegen_gcc/src/consts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_gcc') diff --git a/compiler/rustc_codegen_gcc/src/consts.rs b/compiler/rustc_codegen_gcc/src/consts.rs index 805a265226d..3dc456f1aa0 100644 --- a/compiler/rustc_codegen_gcc/src/consts.rs +++ b/compiler/rustc_codegen_gcc/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; -- cgit 1.4.1-3-g733a5