mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
15 lines
271 B
Rust
15 lines
271 B
Rust
#![feature(type_alias_impl_trait)]
|
|
|
|
type Closure = impl Fn() -> u64;
|
|
struct Anonymous(Closure);
|
|
|
|
fn bop(_: Closure) {
|
|
let y = || -> Closure { || 3 };
|
|
Anonymous(|| {
|
|
//~^ ERROR mismatched types
|
|
3 //~^^ ERROR mismatched types
|
|
})
|
|
}
|
|
|
|
fn main() {}
|