let-chain fmt

This commit is contained in:
Esteban Küber 2023-11-16 17:00:40 +00:00
parent 6a2d9b45c4
commit 1ee37bf03f

View File

@ -2685,8 +2685,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let mod_id = self.tcx.parent_module(id).to_def_id();
let (ty, unwrap) = if let ty::Adt(def, args) = expr_t.kind()
&& (self.tcx.is_diagnostic_item(sym::Result, def.did())
|| self.tcx.is_diagnostic_item(sym::Option, def.did())
)
|| self.tcx.is_diagnostic_item(sym::Option, def.did()))
&& let Some(arg) = args.get(0)
&& let Some(ty) = arg.as_type()
{