From: Smitty Date: Fri, 18 Jun 2021 19:17:13 +0000 (-0400) Subject: Simplify allocation creation X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=43b55cf8935e4f96b143efff1a43bb30c3d55545;p=rust.git Simplify allocation creation --- diff --git a/compiler/rustc_middle/src/mir/interpret/allocation.rs b/compiler/rustc_middle/src/mir/interpret/allocation.rs index 7405a70d39a..36c87f335bd 100644 --- a/compiler/rustc_middle/src/mir/interpret/allocation.rs +++ b/compiler/rustc_middle/src/mir/interpret/allocation.rs @@ -130,9 +130,8 @@ pub fn uninit(size: Size, align: Align) -> InterpResult<'static, Self> { InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted) })?; bytes.resize(size.bytes_usize(), 0); - bytes.fill(0); Ok(Allocation { - bytes: bytes, + bytes, relocations: Relocations::new(), init_mask: InitMask::new(size, false), align,