Adopt let else in more places
This commit is contained in:
parent
b8c56fa8c3
commit
2ef8af6619
132 changed files with 539 additions and 881 deletions
|
@ -26,9 +26,8 @@ impl<'tcx> MirPass<'tcx> for RemoveZsts {
|
|||
if !maybe_zst(place_ty) {
|
||||
continue;
|
||||
}
|
||||
let layout = match tcx.layout_of(param_env.and(place_ty)) {
|
||||
Ok(layout) => layout,
|
||||
Err(_) => continue,
|
||||
let Ok(layout) = tcx.layout_of(param_env.and(place_ty)) else {
|
||||
continue;
|
||||
};
|
||||
if !layout.is_zst() {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue