]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-63279.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / issue-63279.rs
1 // compile-flags: -Zsave-analysis
2
3 #![feature(type_alias_impl_trait)]
4
5 type Closure = impl FnOnce();
6
7 fn c() -> Closure {
8     || -> Closure { || () }
9     //~^ ERROR: mismatched types
10     //~| ERROR: mismatched types
11     //~| ERROR: expected a `FnOnce<()>` closure, found `()`
12 }
13
14 fn main() {}