fork/rust

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

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

master
3.2 KiB75 linesraw
1error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied
2  --> $DIR/same-crate-name.rs:31:20
3   |
4LL |         a::try_foo(foo);
5   |         ---------- ^^^ the trait `main::a::Bar` is not implemented for `Foo`
6   |         |
7   |         required by a bound introduced by this call
8   |
9help: trait impl with same name found
10  --> $DIR/auxiliary/crate_a2.rs:5:1
11   |
12LL | impl Bar for Foo {}
13   | ^^^^^^^^^^^^^^^^
14   = note: perhaps two different versions of crate `crate_a2` are being used?
15   = help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
16note: required by a bound in `try_foo`
17  --> $DIR/auxiliary/crate_a1.rs:3:24
18   |
19LL | pub fn try_foo(x: impl Bar) {}
20   |                        ^^^ required by this bound in `try_foo`
21
22error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied
23  --> $DIR/same-crate-name.rs:38:20
24   |
25LL |         a::try_foo(implements_no_traits);
26   |         ---------- ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait`
27   |         |
28   |         required by a bound introduced by this call
29   |
30   = help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
31note: required by a bound in `try_foo`
32  --> $DIR/auxiliary/crate_a1.rs:3:24
33   |
34LL | pub fn try_foo(x: impl Bar) {}
35   |                        ^^^ required by this bound in `try_foo`
36
37error[E0277]: the trait bound `ImplementsWrongTraitConditionally<isize>: main::a::Bar` is not satisfied
38  --> $DIR/same-crate-name.rs:45:20
39   |
40LL |         a::try_foo(other_variant_implements_mismatched_trait);
41   |         ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally<isize>`
42   |         |
43   |         required by a bound introduced by this call
44   |
45help: trait impl with same name found
46  --> $DIR/auxiliary/crate_a2.rs:13:1
47   |
48LL | impl Bar for ImplementsWrongTraitConditionally<isize> {}
49   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50   = note: perhaps two different versions of crate `crate_a2` are being used?
51   = help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
52note: required by a bound in `try_foo`
53  --> $DIR/auxiliary/crate_a1.rs:3:24
54   |
55LL | pub fn try_foo(x: impl Bar) {}
56   |                        ^^^ required by this bound in `try_foo`
57
58error[E0277]: the trait bound `ImplementsTraitForUsize<isize>: main::a::Bar` is not satisfied
59  --> $DIR/same-crate-name.rs:51:20
60   |
61LL |         a::try_foo(other_variant_implements_correct_trait);
62   |         ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize<isize>`
63   |         |
64   |         required by a bound introduced by this call
65   |
66   = help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
67note: required by a bound in `try_foo`
68  --> $DIR/auxiliary/crate_a1.rs:3:24
69   |
70LL | pub fn try_foo(x: impl Bar) {}
71   |                        ^^^ required by this bound in `try_foo`
72
73error: aborting due to 4 previous errors
74
75For more information about this error, try `rustc --explain E0277`.