rust/tests/ui/impl-trait/issues/issue-74282.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
271 B
Rust
Raw Normal View History

2022-02-17 07:55:58 -06:00
#![feature(type_alias_impl_trait)]
type Closure = impl Fn() -> u64;
struct Anonymous(Closure);
fn bop(_: Closure) {
2022-02-17 07:55:58 -06:00
let y = || -> Closure { || 3 };
Anonymous(|| {
//~^ ERROR mismatched types
3 //~^^ ERROR mismatched types
2022-02-17 07:55:58 -06:00
})
}
fn main() {}