mirror of https://github.com/rust-lang/rust
14 lines
313 B
Rust
14 lines
313 B
Rust
#![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() {}
|