]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-65673.rs
Auto merge of #78066 - bugadani:wat, r=jonas-schievink
[rust.git] / src / test / ui / issues / issue-65673.rs
1 #![feature(trait_alias)] // Enabled to reduce stderr output, but can be triggered even if disabled.
2 trait Trait {}
3 trait WithType {
4     type Ctx;
5 }
6 trait Alias<T> = where T: Trait;
7
8 impl<T> WithType for T {
9     type Ctx = dyn Alias<T>;
10 //~^ ERROR the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
11 }
12 fn main() {}