2022-10-01 10:19:31 +00:00
|
|
|
// 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 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 {
|
2022-02-14 16:10:22 +00:00
|
|
|
//~^ Error future cannot be sent between threads safely
|
2022-02-16 15:48:46 +00:00
|
|
|
async { (ty, ty1) }
|
2020-04-30 04:15:59 +00:00
|
|
|
}
|
2020-05-05 15:26:33 +00:00
|
|
|
|
|
|
|
fn main() {}
|