summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs
blob: ddea7aeb6cda70824e19ce9ca905d41df5a20a91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Regression test for issue #63263.
// Tests that we properly handle closures with an explicit return type
// that return an opaque type.

// check-pass

#![feature(type_alias_impl_trait)]

pub type Closure = impl FnOnce();

fn bop() -> Closure {
    || -> Closure { || () };
    panic!()
}

fn main() {}