Skip to content

Commit 4d84149

Browse files
committed
add test
1 parent f979bf0 commit 4d84149

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Regression test for #145288. This is the same issue as #145151
2+
// which we fixed in #145194. However in that PR we accidentally created
3+
// a `CoroutineWitness` which referenced all generic arguments of the
4+
// coroutine, including upvars and the signature.
5+
6+
//@ edition: 2024
7+
//@ check-pass
8+
9+
async fn process<'a>(x: &'a u32) {
10+
Box::pin(process(x)).await;
11+
}
12+
13+
fn require_send(_: impl Send) {}
14+
15+
fn main() {
16+
require_send(process(&1));
17+
}

0 commit comments

Comments
 (0)