mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
add test
This commit is contained in:
parent
f979bf018f
commit
4d841497da
@ -0,0 +1,17 @@
|
||||
// Regression test for #145288. This is the same issue as #145151
|
||||
// which we fixed in #145194. However in that PR we accidentally created
|
||||
// a `CoroutineWitness` which referenced all generic arguments of the
|
||||
// coroutine, including upvars and the signature.
|
||||
|
||||
//@ edition: 2024
|
||||
//@ check-pass
|
||||
|
||||
async fn process<'a>(x: &'a u32) {
|
||||
Box::pin(process(x)).await;
|
||||
}
|
||||
|
||||
fn require_send(_: impl Send) {}
|
||||
|
||||
fn main() {
|
||||
require_send(process(&1));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user