]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issues/issue-64477-2.rs
1 // Another regression test for #64477.
3 // In the past, the code generated by `format!` produced temporaries in the surrounding scope that
4 // borrowed the arguments through `&dyn Trait`. These temporaries do not implement `Send`, which
5 // meant that when `format!` was used in an async block, the resulting generator was not `Send`.
6 // See https://github.com/rust-lang/rust/issues/64477#issuecomment-534669068 for details
7 // and https://github.com/rust-lang/rust/issues/64477#issuecomment-531882958 for an example.
12 async
fn foo(_
: String
) {}
14 fn bar() -> impl Send
{
16 foo(format
!("{}:{}", 1, 2)).await
;