Skip to content

Commit

Permalink
Add test for #122775
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed May 11, 2024
1 parent be7549f commit ebf574f
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit ebf574f

Please sign in to comment.