Skip to content

Commit b7fba97

Browse files
Format
1 parent f79a95a commit b7fba97

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/libcore/future/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ unsafe impl Sync for ResumeTy {}
4747
#[inline]
4848
pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
4949
where
50-
T: Generator<ResumeTy, Yield = ()>
50+
T: Generator<ResumeTy, Yield = ()>,
5151
{
5252
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
5353
struct GenFuture<T: Generator<ResumeTy, Yield = ()>>(T);

src/librustc_ast_lowering/expr.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -675,11 +675,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
675675

676676
if let Some(task_context_hid) = self.task_context {
677677
let lhs = self.expr_ident(span, task_context_ident, task_context_hid);
678-
let assign = self.expr(
679-
span,
680-
hir::ExprKind::Assign(lhs, yield_expr, span),
681-
AttrVec::new(),
682-
);
678+
let assign =
679+
self.expr(span, hir::ExprKind::Assign(lhs, yield_expr, span), AttrVec::new());
683680
self.stmt_expr(span, assign)
684681
} else {
685682
// Use of `await` outside of an async context. Return `yield_expr` so that we can
@@ -688,8 +685,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
688685
}
689686
};
690687

691-
let loop_block =
692-
self.block_all(span, arena_vec![self; inner_match_stmt, yield_stmt], None);
688+
let loop_block = self.block_all(span, arena_vec![self; inner_match_stmt, yield_stmt], None);
693689

694690
// loop { ...; task_context = yield (); }
695691
let loop_expr = self.arena.alloc(hir::Expr {

0 commit comments

Comments
 (0)