Skip to content

Commit

Permalink
Rollup merge of #125008 - Dirbaio:test-issue-122775, r=compiler-errors
Browse files Browse the repository at this point in the history
Add test for #122775

Closes #122775
  • Loading branch information
matthiaskrgr committed May 11, 2024
2 parents e3fca20 + ebf574f commit d2b0555
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 d2b0555

Please sign in to comment.