diff options
| author | est31 <MTest31@outlook.com> | 2022-02-19 00:47:43 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-02-19 01:55:47 +0100 |
| commit | 5cc292eb1dcb22bd6a46478165b5820f8177c87f (patch) | |
| tree | 28d4d27bd86d09f53475cd9d55afc730cc21fcb6 /compiler/rustc_const_eval/src/interpret/terminator.rs | |
| parent | b8c56fa8c30821129b0960180f528d4a1a4f9316 (diff) | |
| download | rust-5cc292eb1dcb22bd6a46478165b5820f8177c87f.tar.gz rust-5cc292eb1dcb22bd6a46478165b5820f8177c87f.zip | |
rustc_const_eval: adopt let else in more places
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/terminator.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/terminator.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index f3910c9765d..8094bf0cf2e 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -321,10 +321,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { | ty::InstanceDef::CloneShim(..) | ty::InstanceDef::Item(_) => { // We need MIR for this fn - let (body, instance) = - match M::find_mir_or_eval_fn(self, instance, caller_abi, args, ret, unwind)? { - Some(body) => body, - None => return Ok(()), + let Some((body, instance)) = + M::find_mir_or_eval_fn(self, instance, caller_abi, args, ret, unwind)? else { + return Ok(()); }; // Compute callee information using the `instance` returned by |
