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.

13 lines
388 B
Rust
Raw Normal View History

// revisions: no_drop_tracking drop_tracking drop_tracking_mir
// [drop_tracking] compile-flags: -Zdrop-tracking
// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
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() {}