This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc #132713 cc #133267
16 lines
377 B
Rust
16 lines
377 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` is not dyn compatible
|
|
}
|
|
|
|
fn main() {}
|