Skip to content

Commit 0a3a830

Browse files
::Ref
1 parent 408c44d commit 0a3a830

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

crates/hir-def/src/expr_store/lower.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,15 +1001,10 @@ impl<'db> ExprCollector<'db> {
10011001
*param = pat_id;
10021002
}
10031003

1004-
let capture_by = match kind {
1005-
// Async closures use by-ref by default so they don't all collapse to `FnOnce`.
1006-
CoroutineKind::Async => CaptureBy::Ref,
1007-
CoroutineKind::Gen | CoroutineKind::AsyncGen => CaptureBy::Value,
1008-
};
10091004
let coroutine = self.desugared_coroutine_expr(
10101005
kind,
10111006
coroutine_source,
1012-
capture_by,
1007+
CaptureBy::Ref,
10131008
None,
10141009
statements.into_boxed_slice(),
10151010
Some(body),

0 commit comments

Comments
 (0)