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 authored May 11, 2024
2 parents c3ecdb3 + ebf574f commit 0fffb3f
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 0fffb3f

Please sign in to comment.