// 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 main() {
    || -> Closure { || () };
}

// Regression test for issue #63263.
// Tests that we properly handle closures with an explicit return type
// that return an opaque type.

// run-pass

#![feature(type_alias_impl_trait)]

pub type Closure = impl FnOnce();

fn main() {
    || -> Closure { || () };
}

--- 
+++ 
@@ -2,7 +2,7 @@
 // Tests that we properly handle closures with an explicit return type
 // that return an opaque type.
 
-// run-pass
+// check-pass
 
 #![feature(type_alias_impl_trait)]
 
Change test type to `check-pass`

Co-Authored-By: Mazdak Farrokhzad <ff865cd2e2cdd09a913011ca3890d90f7014c98c@gmail.com>