]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/object/enforce-supertrait-projection.stderr
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / traits / object / enforce-supertrait-projection.stderr
1 error[E0271]: type mismatch resolving `<dyn Trait<B = B, A = A> as SuperTrait>::A == B`
2   --> $DIR/enforce-supertrait-projection.rs:9:17
3    |
4 LL | fn transmute<A, B>(x: A) -> B {
5    |              -  - expected type parameter
6    |              |
7    |              found type parameter
8 LL |     foo::<A, B, dyn Trait<A = A, B = B>>(x)
9    |                 ^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `B`, found type parameter `A`
10    |
11    = note: expected type parameter `B`
12               found type parameter `A`
13    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
14    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
15 note: required by a bound in `foo`
16   --> $DIR/enforce-supertrait-projection.rs:15:8
17    |
18 LL | fn foo<A, B, T: ?Sized>(x: T::A) -> B
19    |    --- required by a bound in this
20 LL | where
21 LL |     T: Trait<B = B>,
22    |        ^^^^^^^^^^^^ required by this bound in `foo`
23
24 error: aborting due to previous error
25
26 For more information about this error, try `rustc --explain E0271`.