]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / 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 }