1 // compile-flags: -Zsave-analysis
3 #![feature(type_alias_impl_trait)]
5 type Closure = impl FnOnce();
8 //~^ ERROR: expected a `FnOnce<()>` closure, found `()`
9 || -> Closure { || () }
10 //~^ ERROR: mismatched types
11 //~| ERROR: mismatched types
12 //~| ERROR: expected a `FnOnce<()>` closure, found `()`