Skip to content

Commit a8e8f18

Browse files
authored
Rollup merge of rust-lang#104357 - RalfJung:is-sized, r=cjgillot
add is_sized method on Abi and Layout, and use it This avoids the double negation of `!is_unsized()` that we have quite a lot.
2 parents e5b6ca1 + 35628f9 commit a8e8f18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stacked_borrows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
10531053
// pointers we need to retag, so we can stop recursion early.
10541054
// This optimization is crucial for ZSTs, because they can contain way more fields
10551055
// than we can ever visit.
1056-
if !place.layout.is_unsized() && place.layout.size < self.ecx.pointer_size() {
1056+
if place.layout.is_sized() && place.layout.size < self.ecx.pointer_size() {
10571057
return Ok(());
10581058
}
10591059

0 commit comments

Comments
 (0)