]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / issue-63263-closure-return.rs
1 // Regression test for issue #63263.
2 // Tests that we properly handle closures with an explicit return type
3 // that return an opaque type.
4
5 // check-pass
6
7 #![feature(type_alias_impl_trait)]
8
9 pub type Closure = impl FnOnce();
10
11 fn main() {
12     || -> Closure { || () };
13 }