error: opaque type's hidden type cannot be another opaque type from the same scope --> $DIR/nested_type_alias_impl_trait.rs:14:9 | LL | get_foo() | ^^^^^^^^^ one of the two opaque types used here has to be outside its defining scope | note: opaque type whose hidden type is being assigned --> $DIR/nested_type_alias_impl_trait.rs:7:21 | LL | pub type Foot = impl Debug; | ^^^^^^^^^^ note: opaque type being used as hidden type --> $DIR/nested_type_alias_impl_trait.rs:6:20 | LL | pub type Foo = impl Debug; | ^^^^^^^^^^ error: aborting due to previous error