rust/tests/ui/async-await/issue-70818.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
217 B
Rust
Raw Normal View History

2020-05-06 03:49:30 -05:00
// edition:2018
2020-04-29 23:15:59 -05:00
2020-05-06 03:49:30 -05:00
use std::future::Future;
fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
//~^ Error future cannot be sent between threads safely
async { (ty, ty1) }
2020-04-29 23:15:59 -05:00
}
fn main() {}