#![feature(trait_alias)] // Enabled to reduce stderr output, but can be triggered even if disabled. trait Trait {} trait WithType { type Ctx; } trait Alias = where T: Trait; impl WithType for T { type Ctx = dyn Alias; //~^ ERROR the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time } fn main() {}