fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
929 B22 linesraw
1error[E0277]: the trait bound `dyn Trait<A = A, B = B>: Trait` is not satisfied
2  --> $DIR/more-object-bound.rs:12:5
3   |
4LL |     foo::<A, B, dyn Trait<A = A, B = B>>(x)
5   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `dyn Trait<A = A, B = B>`
6   |
7note: required by a bound in `foo`
8  --> $DIR/more-object-bound.rs:18:8
9   |
10LL | fn foo<A, B, T: ?Sized>(x: T::A) -> B
11   |    --- required by a bound in this function
12LL | where
13LL |     T: Trait<B = B>,
14   |        ^^^^^^^^^^^^ required by this bound in `foo`
15help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
16   |
17LL | fn transmute<A, B>(x: A) -> B where dyn Trait<A = A, B = B>: Trait {
18   |                               ++++++++++++++++++++++++++++++++++++
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0277`.