2019-11-14 11:29:01 -08:00
|
|
|
#![feature(trait_alias)] // Enabled to reduce stderr output, but can be triggered even if disabled.
|
2019-11-13 16:06:28 -08:00
|
|
|
trait Trait {}
|
|
|
|
trait WithType {
|
|
|
|
type Ctx;
|
|
|
|
}
|
|
|
|
trait Alias<T> = where T: Trait;
|
|
|
|
|
|
|
|
impl<T> WithType for T {
|
|
|
|
type Ctx = dyn Alias<T>;
|
2022-05-04 22:47:09 +02:00
|
|
|
//~^ ERROR at least one trait is required for an object type [E0224]
|
2019-11-13 16:06:28 -08:00
|
|
|
}
|
|
|
|
fn main() {}
|