mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
Add test for #122775
This commit is contained in:
parent
be7549f82c
commit
ebf574fb97
|
@ -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() {}
|
Loading…
Reference in a new issue