From c3a7ca1125e017ecf5e46685f8ee6feccceec0c7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 6 Nov 2022 13:44:50 +0100 Subject: move InitMask to its own module --- compiler/rustc_codegen_llvm/src/consts.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_codegen_llvm/src') diff --git a/compiler/rustc_codegen_llvm/src/consts.rs b/compiler/rustc_codegen_llvm/src/consts.rs index b58b47df65f..b23074935e1 100644 --- a/compiler/rustc_codegen_llvm/src/consts.rs +++ b/compiler/rustc_codegen_llvm/src/consts.rs @@ -38,9 +38,7 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation< alloc: &'a Allocation, range: Range, ) { - let chunks = alloc - .init_mask() - .range_as_init_chunks(Size::from_bytes(range.start), Size::from_bytes(range.end)); + let chunks = alloc.init_mask().range_as_init_chunks(range.clone().into()); let chunk_to_llval = move |chunk| match chunk { InitChunk::Init(range) => { -- cgit 1.4.1-3-g733a5