type Closure = impl FnOnce();
fn c() -> Closure {
- || -> Closure { || () } //~ ERROR: mismatched types
+ || -> Closure { || () }
+ //~^ ERROR: mismatched types
+ //~| ERROR: mismatched types
+ //~| ERROR: expected a `FnOnce<()>` closure, found `()`
}
fn main() {}