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