Files
rust/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
Esteban Küber f0845adb0c Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
2025-02-10 20:21:39 +00:00

45 lines
1.6 KiB
Plaintext

error[E0311]: the parameter type `Self` may not live long enough
|
note: ...that is required by this bound
--> $DIR/supertrait-mentions-GAT.rs:6:15
|
LL | Self: 'a;
| ^^
= help: consider adding an explicit lifetime bound `Self: 'a`...
error: associated item referring to unboxed trait object for its own trait
--> $DIR/supertrait-mentions-GAT.rs:10:20
|
LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
| ---------- in this trait
LL | fn c(&self) -> dyn SuperTrait<T>;
| ^^^^^^^^^^^^^^^^^
|
help: you might have meant to use `Self` to refer to the implementing type
|
LL - fn c(&self) -> dyn SuperTrait<T>;
LL + fn c(&self) -> Self;
|
error[E0038]: the trait `SuperTrait` is not dyn compatible
--> $DIR/supertrait-mentions-GAT.rs:10:20
|
LL | fn c(&self) -> dyn SuperTrait<T>;
| ^^^^^^^^^^^^^^^^^ `SuperTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/supertrait-mentions-GAT.rs:4:10
|
LL | type Gat<'a>
| ^^^ ...because it contains the generic associated type `Gat`
...
LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
| ---------- this trait is not dyn compatible...
= help: consider moving `Gat` to another trait
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0038, E0311.
For more information about an error, try `rustc --explain E0038`.