summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/issues/issue-74282.rs
blob: 654de0cd0253c4a77f51adf1a0fbba8f084630d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(type_alias_impl_trait)]

type Closure = impl Fn() -> u64;
struct Anonymous(Closure);

fn main() {
    let y = || -> Closure { || 3 };
    Anonymous(|| { //~ ERROR mismatched types
        3 //~^ ERROR mismatched types
    })
}