rustc_const_eval: adopt let else in more places

This commit is contained in:
est31
2022-02-19 00:47:43 +01:00
parent b8c56fa8c3
commit 5cc292eb1d
13 changed files with 86 additions and 123 deletions

View File

@@ -15,12 +15,9 @@ where
L: HasLocalDecls<'tcx>,
{
debug!("is_disaligned({:?})", place);
let pack = match is_within_packed(tcx, local_decls, place) {
None => {
debug!("is_disaligned({:?}) - not within packed", place);
return false;
}
Some(pack) => pack,
let Some(pack) = is_within_packed(tcx, local_decls, place) else {
debug!("is_disaligned({:?}) - not within packed", place);
return false;
};
let ty = place.ty(local_decls, tcx).ty;