blob: 02f2111468a25daaaa77ebac5e650730c117ac3f (
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() {}
|