rust/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs
2023-01-11 09:32:08 +00:00

16 lines
385 B
Rust

//~ ERROR the parameter type `Self` may not live long enough
trait GatTrait {
type Gat<'a>
where
Self: 'a;
}
trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
fn c(&self) -> dyn SuperTrait<T>;
//~^ ERROR associated item referring to unboxed trait object for its own trait
//~| ERROR the trait `SuperTrait` cannot be made into an object
}
fn main() {}