#![feature(type_alias_impl_trait)] // check-pass trait Trait {} type TAIT = impl Trait; struct Concrete; impl Trait for Concrete {} fn tait() -> TAIT { Concrete } trait OuterTrait { type Item; } struct Dummy { t: T, } impl OuterTrait for Dummy { type Item = T; } fn tait_and_impl_trait() -> impl OuterTrait { Dummy { t: (tait(), Concrete), } } fn tait_and_dyn_trait() -> impl OuterTrait)> { let b: Box = Box::new(Concrete); Dummy { t: (tait(), b) } } fn main() {}