rust/src/test/ui/async-await/issue-70818.rs

8 lines
175 B
Rust
Raw Normal View History

2020-04-29 23:15:59 -05:00
// edition 2018
fn foo<T: Sized>(ty: T) -> impl std::future::Future<Output = T> + Send { //~ Error `T` cannot be sent between threads safely
async { ty }
2020-04-29 23:15:59 -05:00
}
fn main() {}