mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
let-chain fmt
This commit is contained in:
parent
6a2d9b45c4
commit
1ee37bf03f
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user