summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/closure_args.rs
blob: c5e7af81d3dd0948dfc95d3b101e7ea4216a62e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// check-pass

// regression test for https://github.com/rust-lang/rust/issues/100800

#![feature(type_alias_impl_trait)]

trait Anything {}
impl<T> Anything for T {}
type Input = impl Anything;
fn run<F: FnOnce(Input) -> ()>(f: F, i: Input) {
    f(i);
}

fn main() {
    run(|x: u32| {println!("{x}");}, 0);
}