1
Fork 0

Adopt let_else in even more places

This commit is contained in:
est31 2022-02-15 05:58:25 +01:00
parent 3cfa4def7c
commit 60f969a4f2
26 changed files with 50 additions and 104 deletions

View file

@ -1752,9 +1752,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
<ul>",
);
let adt = if let Adt(adt, _) = ty_layout.ty.kind() {
adt
} else {
let Adt(adt, _) = ty_layout.ty.kind() else {
span_bug!(tcx.def_span(ty_def_id), "not an adt")
};