2021-07-22 19:16:33 +01:00
|
|
|
#![feature(unboxed_closures)]
|
2021-07-26 17:01:16 -03:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2021-07-22 19:16:33 +01:00
|
|
|
|
2022-02-14 16:10:22 +00:00
|
|
|
//@ check-pass
|
|
|
|
|
|
2021-07-22 19:16:33 +01:00
|
|
|
type FunType = impl Fn<()>;
|
2024-07-26 10:04:02 +00:00
|
|
|
#[define_opaque(FunType)]
|
|
|
|
|
fn foo() -> FunType {
|
|
|
|
|
some_fn
|
|
|
|
|
}
|
2021-07-22 19:16:33 +01:00
|
|
|
|
|
|
|
|
fn some_fn() {}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2024-07-26 10:04:02 +00:00
|
|
|
let _: <FunType as FnOnce<()>>::Output = foo()();
|
2021-07-22 19:16:33 +01:00
|
|
|
}
|