From 35628f96a4a7da6dcd9728b6aec4f19681be9d5e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 13 Nov 2022 12:14:59 +0100 Subject: [PATCH] add is_sized method on Abi and Layout, and use it --- src/stacked_borrows/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stacked_borrows/mod.rs b/src/stacked_borrows/mod.rs index 5ec787dd44113..644095279fd8c 100644 --- a/src/stacked_borrows/mod.rs +++ b/src/stacked_borrows/mod.rs @@ -1053,7 +1053,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { // pointers we need to retag, so we can stop recursion early. // This optimization is crucial for ZSTs, because they can contain way more fields // than we can ever visit. - if !place.layout.is_unsized() && place.layout.size < self.ecx.pointer_size() { + if place.layout.is_sized() && place.layout.size < self.ecx.pointer_size() { return Ok(()); }