File tree 1 file changed +3
-2
lines changed
src/librustc_ast_lowering
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -561,7 +561,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
561
561
/// ::std::task::Poll::Ready(result) => break result,
562
562
/// ::std::task::Poll::Pending => {}
563
563
/// }
564
- /// yield ();
564
+ /// task_context = yield ();
565
565
/// }
566
566
/// }
567
567
/// ```
@@ -664,6 +664,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
664
664
self . stmt_expr ( span, match_expr)
665
665
} ;
666
666
667
+ // task_context = yield ();
667
668
let yield_stmt = {
668
669
let unit = self . expr_unit ( span) ;
669
670
let yield_expr = self . expr (
@@ -687,7 +688,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
687
688
688
689
let loop_block = self . block_all ( span, arena_vec ! [ self ; inner_match_stmt, yield_stmt] , None ) ;
689
690
690
- // loop { ...; task_context = yield (); }
691
+ // loop { .. }
691
692
let loop_expr = self . arena . alloc ( hir:: Expr {
692
693
hir_id : loop_hir_id,
693
694
kind : hir:: ExprKind :: Loop ( loop_block, None , hir:: LoopSource :: Loop ) ,
You can’t perform that action at this time.
0 commit comments