diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-26 06:21:54 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-28 06:10:14 +0500 |
| commit | bae38bad7803be7fdf1878188da9650f82548016 (patch) | |
| tree | 6ac78d3032bec33e133feaf8f9aa4e8027cb362d /compiler/rustc_mir_transform/src | |
| parent | 43725ed819c57b86b32a66c40572246b1f5b8952 (diff) | |
| download | rust-bae38bad7803be7fdf1878188da9650f82548016.tar.gz rust-bae38bad7803be7fdf1878188da9650f82548016.zip | |
use let chains in hir, lint, mir
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coroutine/drop.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine/drop.rs b/compiler/rustc_mir_transform/src/coroutine/drop.rs index 406575c4f43..1a314e029f4 100644 --- a/compiler/rustc_mir_transform/src/coroutine/drop.rs +++ b/compiler/rustc_mir_transform/src/coroutine/drop.rs @@ -23,10 +23,10 @@ impl<'tcx> MutVisitor<'tcx> for FixReturnPendingVisitor<'tcx> { } // Converting `_0 = Poll::<Rv>::Pending` to `_0 = Poll::<()>::Pending` - if let Rvalue::Aggregate(kind, _) = rvalue { - if let AggregateKind::Adt(_, _, ref mut args, _, _) = **kind { - *args = self.tcx.mk_args(&[self.tcx.types.unit.into()]); - } + if let Rvalue::Aggregate(kind, _) = rvalue + && let AggregateKind::Adt(_, _, ref mut args, _, _) = **kind + { + *args = self.tcx.mk_args(&[self.tcx.types.unit.into()]); } } } |
