Skip to content

Commit 6b09bc5

Browse files
authored
Unrolled build for rust-lang#141094
Rollup merge of rust-lang#141094 - satler-git:issue-101650, r=lcnr add regression test for rust-lang#101650 closes rust-lang#101650, which was already fixed.
2 parents e42bbfe + 067fe1f commit 6b09bc5

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// regression test for <https://github.com/rust-lang/rust/issues/101650>
2+
// assert that Future which has format!() with an async function is Send
3+
4+
#![allow(unused)]
5+
6+
//@ check-pass
7+
//@ edition: 2018
8+
9+
use core::future::Future;
10+
use core::pin::Pin;
11+
12+
fn build_string() -> Pin<Box<dyn Future<Output = String> + Send>> {
13+
Box::pin(async move {
14+
let mut string_builder = String::new();
15+
string_builder += &format!("Hello {}", helper().await);
16+
string_builder
17+
})
18+
}
19+
20+
async fn helper() -> String {
21+
"World".to_string()
22+
}
23+
24+
fn main() {}

0 commit comments

Comments
 (0)