about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-11-06 13:44:50 +0100
committerRalf Jung <post@ralfj.de>2022-11-06 14:17:10 +0100
commitc3a7ca1125e017ecf5e46685f8ee6feccceec0c7 (patch)
treebd477112ff75138a4494286a9eef7564b58fca86 /compiler/rustc_codegen_llvm/src
parent3477645a23bbb25b61d5e17d6d45a06821188876 (diff)
downloadrust-c3a7ca1125e017ecf5e46685f8ee6feccceec0c7.tar.gz
rust-c3a7ca1125e017ecf5e46685f8ee6feccceec0c7.zip
move InitMask to its own module
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/consts.rs4
1 files changed, 1 insertions, 3 deletions
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<usize>,
     ) {
-        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) => {