2023-09-07 01:57:08 -05:00
|
|
|
error[E0271]: type mismatch resolving `<dyn Trait<A = A, B = B> as SuperTrait>::A == B`
|
2022-08-13 02:14:54 -05:00
|
|
|
--> $DIR/enforce-supertrait-projection.rs:9:17
|
2021-12-26 00:45:05 -06:00
|
|
|
|
|
|
|
|
LL | fn transmute<A, B>(x: A) -> B {
|
|
|
|
| - - expected type parameter
|
|
|
|
| |
|
|
|
|
| found type parameter
|
|
|
|
LL | foo::<A, B, dyn Trait<A = A, B = B>>(x)
|
2022-08-13 02:14:54 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `B`, found type parameter `A`
|
2021-12-26 00:45:05 -06:00
|
|
|
|
|
|
|
|
= note: expected type parameter `B`
|
|
|
|
found type parameter `A`
|
|
|
|
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
|
|
|
|
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
|
|
|
|
note: required by a bound in `foo`
|
|
|
|
--> $DIR/enforce-supertrait-projection.rs:15:8
|
|
|
|
|
|
|
|
|
LL | fn foo<A, B, T: ?Sized>(x: T::A) -> B
|
2023-02-20 23:21:07 -06:00
|
|
|
| --- required by a bound in this function
|
2021-12-26 00:45:05 -06:00
|
|
|
LL | where
|
|
|
|
LL | T: Trait<B = B>,
|
|
|
|
| ^^^^^^^^^^^^ required by this bound in `foo`
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2021-12-26 00:45:05 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0271`.
|