2022-02-17 07:55:58 -06:00
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
|
|
|
|
type Closure = impl Fn() -> u64;
|
|
|
|
struct Anonymous(Closure);
|
|
|
|
|
2023-06-15 04:41:14 -05:00
|
|
|
fn bop(_: Closure) {
|
2022-02-17 07:55:58 -06:00
|
|
|
let y = || -> Closure { || 3 };
|
2023-06-15 04:41:14 -05:00
|
|
|
Anonymous(|| {
|
|
|
|
//~^ ERROR mismatched types
|
|
|
|
3 //~^^ ERROR mismatched types
|
2022-02-17 07:55:58 -06:00
|
|
|
})
|
|
|
|
}
|
2023-06-15 04:41:14 -05:00
|
|
|
|
|
|
|
fn main() {}
|