We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 408c44d commit 0a3a830Copy full SHA for 0a3a830
1 file changed
crates/hir-def/src/expr_store/lower.rs
@@ -1001,15 +1001,10 @@ impl<'db> ExprCollector<'db> {
1001
*param = pat_id;
1002
}
1003
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
- };
1009
let coroutine = self.desugared_coroutine_expr(
1010
kind,
1011
coroutine_source,
1012
- capture_by,
+ CaptureBy::Ref,
1013
None,
1014
statements.into_boxed_slice(),
1015
Some(body),
0 commit comments