Skip to content

Commit

Permalink
Apply clippy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
artemagvanian committed Jul 12, 2024
1 parent 8a40e94 commit ba3a892
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,15 +595,13 @@ impl<'a> MirVisitor for CheckUninitVisitor<'a> {
reason: "Kani does not support reasoning about memory initialization in presence of mutable raw pointer casts that could cause delayed UB.".to_string(),
});
}
} else {
if !tys_layout_compatible(&operand_ty, &ty) {
// If transmuting between two types of incompatible layouts, padding
// bytes are exposed, which is UB.
self.push_target(MemoryInitOp::Unsupported {
reason: "Transmuting between types of incompatible layouts."
.to_string(),
});
}
} else if !tys_layout_compatible(&operand_ty, &ty) {
// If transmuting between two types of incompatible layouts, padding
// bytes are exposed, which is UB.
self.push_target(MemoryInitOp::Unsupported {
reason: "Transmuting between types of incompatible layouts."
.to_string(),
});
}
}
_ => {}
Expand Down

0 comments on commit ba3a892

Please sign in to comment.