Skip to content

Commit 058e829

Browse files
committed
Fix FixReturnPendingVisitor.
1 parent b489b64 commit 058e829

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • compiler/rustc_mir_transform/src/coroutine

compiler/rustc_mir_transform/src/coroutine/drop.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
use super::*;
44

5-
// Fix return CoroutineState<Yv, Rv>::Pending statement into CoroutineState<(), ()>::Pending for
6-
// async drop function.
5+
/// Fix return CoroutineState<Yv, Rv>::Pending statement into CoroutineState<(), ()>::Pending.
6+
// FIXME(async_drop) Is this correct with async generators?
77
struct FixReturnPendingVisitor<'tcx> {
88
tcx: TyCtxt<'tcx>,
99
}
@@ -28,7 +28,7 @@ impl<'tcx> MutVisitor<'tcx> for FixReturnPendingVisitor<'tcx> {
2828
if let Rvalue::Aggregate(kind, _) = rvalue
2929
&& let AggregateKind::Adt(_, _, ref mut args, _, _) = **kind
3030
{
31-
*args = self.tcx.mk_args(&[args.type_at(0).into(), self.tcx.types.unit.into()]);
31+
*args = self.tcx.mk_args(&[self.tcx.types.unit.into(), self.tcx.types.unit.into()]);
3232
}
3333
}
3434
}

0 commit comments

Comments
 (0)