]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-63279.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / 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     //~^ ERROR: expected a `FnOnce<()>` closure, found `()`
9     || -> Closure { || () }
10     //~^ ERROR: mismatched types
11     //~| ERROR: mismatched types
12     //~| ERROR: expected a `FnOnce<()>` closure, found `()`
13 }
14
15 fn main() {}