Skip to content

Commit

Permalink
Rollup merge of rust-lang#125008 - Dirbaio:test-issue-122775, r=compi…
Browse files Browse the repository at this point in the history
…ler-errors

Add test for rust-lang#122775

Closes rust-lang#122775
  • Loading branch information
GuillaumeGomez committed May 11, 2024
2 parents a59ad73 + ebf574f commit 9d1cff1
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 9d1cff1

Please sign in to comment.