This commit is contained in:
Dario Nieuwenhuis 2024-05-11 12:57:29 +02:00
parent be7549f82c
commit ebf574fb97

View File

@ -0,0 +1,17 @@
//@ check-pass
#![feature(type_alias_impl_trait)]
fn spawn<T, F>(future: F) -> impl Sized
where
F: FnOnce() -> T,
{
future
}
fn spawn_task(sender: &'static ()) -> impl Sized {
type Tait = impl Sized + 'static;
spawn::<Tait, _>(move || sender)
}
fn main() {}