Skip to content

Commit 2af9121

Browse files
committed
More readable condition
1 parent 2825e53 commit 2af9121

File tree

1 file changed

+1
-3
lines changed
  • compiler/rustc_target/src/abi

1 file changed

+1
-3
lines changed

compiler/rustc_target/src/abi/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1163,9 +1163,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
11631163
match &self.fields {
11641164
FieldsShape::Primitive | FieldsShape::Union { .. } => {}
11651165
FieldsShape::Array { count, .. } => {
1166-
if !(*count == 0
1167-
|| self.field(cx, 0).to_result()?.might_permit_raw_init(cx, zero)?)
1168-
{
1166+
if *count > 0 && !self.field(cx, 0).to_result()?.might_permit_raw_init(cx, zero)? {
11691167
// Found non empty array with a type that is unhappy about this kind of initialization
11701168
return Ok(false);
11711169
}

0 commit comments

Comments
 (0)