blob: 0e46745c65cd605f91a4e4aa0626d496dd00867b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#![feature(type_alias_impl_trait)]
type Closure = impl FnOnce();
fn c() -> Closure {
//~^ ERROR: expected a `FnOnce<()>` closure, found `()`
|| -> Closure { || () }
//~^ ERROR: mismatched types
//~| ERROR: mismatched types
//~| ERROR: expected a `FnOnce<()>` closure, found `()`
}
fn main() {}
|