collapsible_if

This commit is contained in:
Johann Hemmann 2024-01-19 13:22:32 +01:00
parent 3409645c3f
commit b5eca5f2fc
7 changed files with 47 additions and 51 deletions

View file

@ -1842,10 +1842,10 @@ impl Evaluator<'_> {
}
}
let layout = self.layout(ty);
if self.assert_placeholder_ty_is_unused {
if matches!(layout, Err(MirEvalError::LayoutError(LayoutError::HasPlaceholder, _))) {
return Ok(Some((0, 1)));
}
if self.assert_placeholder_ty_is_unused
&& matches!(layout, Err(MirEvalError::LayoutError(LayoutError::HasPlaceholder, _)))
{
return Ok(Some((0, 1)));
}
let layout = layout?;
Ok(layout