From 43b55cf8935e4f96b143efff1a43bb30c3d55545 Mon Sep 17 00:00:00 2001 From: Smitty Date: Fri, 18 Jun 2021 15:17:13 -0400 Subject: [PATCH] Simplify allocation creation --- compiler/rustc_middle/src/mir/interpret/allocation.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 @@ impl Allocation { 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,