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
218 B
Rust
Raw Normal View History

2020-05-06 08:49:30 +00:00
//@ edition:2018
2020-04-30 04:15:59 +00:00
2020-05-06 08:49:30 +00: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-30 04:15:59 +00:00
}
fn main() {}