Adopt let else in more places
This commit is contained in:
parent
b8c56fa8c3
commit
2ef8af6619
132 changed files with 539 additions and 881 deletions
|
@ -734,9 +734,8 @@ pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> Body<'_> {
|
|||
let sig = tcx.fn_sig(ctor_id).no_bound_vars().expect("LBR in ADT constructor signature");
|
||||
let sig = tcx.normalize_erasing_regions(param_env, sig);
|
||||
|
||||
let (adt_def, substs) = match sig.output().kind() {
|
||||
ty::Adt(adt_def, substs) => (adt_def, substs),
|
||||
_ => bug!("unexpected type for ADT ctor {:?}", sig.output()),
|
||||
let ty::Adt(adt_def, substs) = sig.output().kind() else {
|
||||
bug!("unexpected type for ADT ctor {:?}", sig.output());
|
||||
};
|
||||
|
||||
debug!("build_ctor: ctor_id={:?} sig={:?}", ctor_id, sig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue