diff options
| author | Ralf Jung <post@ralfj.de> | 2022-11-06 13:44:50 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-11-06 14:17:10 +0100 |
| commit | c3a7ca1125e017ecf5e46685f8ee6feccceec0c7 (patch) | |
| tree | bd477112ff75138a4494286a9eef7564b58fca86 /compiler/rustc_const_eval/src/interpret | |
| parent | 3477645a23bbb25b61d5e17d6d45a06821188876 (diff) | |
| download | rust-c3a7ca1125e017ecf5e46685f8ee6feccceec0c7.tar.gz rust-c3a7ca1125e017ecf5e46685f8ee6feccceec0c7.zip | |
move InitMask to its own module
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/memory.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/memory.rs b/compiler/rustc_const_eval/src/interpret/memory.rs index 19e8dd660f0..4eda9882da3 100644 --- a/compiler/rustc_const_eval/src/interpret/memory.rs +++ b/compiler/rustc_const_eval/src/interpret/memory.rs @@ -1089,7 +1089,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { .prepare_copy(src_range, dest_offset, num_copies, self) .map_err(|e| e.to_interp_error(dest_alloc_id))?; // Prepare a copy of the initialization mask. - let init = src_alloc.compress_uninit_range(src_range); + let init = src_alloc.init_mask().prepare_copy(src_range); // Destination alloc preparations and access hooks. let (dest_alloc, extra) = self.get_alloc_raw_mut(dest_alloc_id)?; @@ -1155,8 +1155,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { } // now fill in all the "init" data - dest_alloc.mark_compressed_init_range( - &init, + dest_alloc.init_mask_apply_copy( + init, alloc_range(dest_offset, size), // just a single copy (i.e., not full `dest_range`) num_copies, ); |
