mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
13 lines
388 B
Rust
13 lines
388 B
Rust
// revisions: no_drop_tracking drop_tracking drop_tracking_mir
|
|
// [drop_tracking] compile-flags: -Zdrop-tracking
|
|
// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
|
|
// edition:2018
|
|
|
|
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) }
|
|
}
|
|
|
|
fn main() {}
|