// issue: 113596 #![feature(type_alias_impl_trait)] trait Test {} struct A; impl Test for A {} struct B { inner: T, } impl Test for B {} pub type TestImpl = impl Test; #[define_opaque(TestImpl)] pub fn test() -> TestImpl { A } #[define_opaque(TestImpl)] fn make_option2() -> Option { //~^ ERROR cannot resolve opaque type let inner = make_option().unwrap(); Some(B { inner }) } fn make_option() -> Option { Some(test()) } fn main() {}