Skip to content

Commit aed54f2

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 aed54f2

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)