Skip to content

Commit 3ffb87c

Browse files
committed
tests/ui/async-await/gat-is-send-across-await.rs: New regression test
The test began passing in `nightly-2025-10-16`. Probably by c50aebb because it fixed two "does not live long enough" errors. The test fails to compile with `nightly-2025-10-15` with such an error: $ rustc +nightly-2025-10-15 --edition 2018 tests/ui/async-await/gat-is-send-across-await.rs error: `impl G` does not live long enough --> tests/ui/async-await/gat-is-send-across-await.rs:16:24 | 16 | let _: &dyn Send = &async move { | ________________________^ 17 | | let _gat = g.as_gat(); 18 | | async{}.await 19 | | }; | |_____^
1 parent bfc05d6 commit 3ffb87c

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/111852>.
2+
3+
//@ edition:2018
4+
5+
#![allow(unused)]
6+
7+
trait G: Send {
8+
type Gat<'l>: Send
9+
where
10+
Self: 'l;
11+
12+
fn as_gat(&self) -> Self::Gat<'_>;
13+
}
14+
15+
fn a(g: impl G) {
16+
let _: &dyn Send = &async move {
17+
let _gat = g.as_gat();
18+
async{}.await
19+
};
20+
}
21+
22+
fn main() { }

0 commit comments

Comments
 (0)