]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/bound/same-crate-name.stderr
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / tests / ui / traits / bound / same-crate-name.stderr
1 error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied
2   --> $DIR/same-crate-name.rs:31:20
3    |
4 LL |         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    |
9 help: trait impl with same name found
10   --> $DIR/auxiliary/crate_a2.rs:5:1
11    |
12 LL | 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>`
16 note: required by a bound in `try_foo`
17   --> $DIR/auxiliary/crate_a1.rs:3:24
18    |
19 LL | pub fn try_foo(x: impl Bar) {}
20    |                        ^^^ required by this bound in `try_foo`
21
22 error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied
23   --> $DIR/same-crate-name.rs:38:20
24    |
25 LL |         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>`
31 note: required by a bound in `try_foo`
32   --> $DIR/auxiliary/crate_a1.rs:3:24
33    |
34 LL | pub fn try_foo(x: impl Bar) {}
35    |                        ^^^ required by this bound in `try_foo`
36
37 error[E0277]: the trait bound `ImplementsWrongTraitConditionally<isize>: main::a::Bar` is not satisfied
38   --> $DIR/same-crate-name.rs:45:20
39    |
40 LL |         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    |
45 help: trait impl with same name found
46   --> $DIR/auxiliary/crate_a2.rs:13:1
47    |
48 LL | 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>`
52 note: required by a bound in `try_foo`
53   --> $DIR/auxiliary/crate_a1.rs:3:24
54    |
55 LL | pub fn try_foo(x: impl Bar) {}
56    |                        ^^^ required by this bound in `try_foo`
57
58 error[E0277]: the trait bound `ImplementsTraitForUsize<isize>: main::a::Bar` is not satisfied
59   --> $DIR/same-crate-name.rs:51:20
60    |
61 LL |         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>`
67 note: required by a bound in `try_foo`
68   --> $DIR/auxiliary/crate_a1.rs:3:24
69    |
70 LL | pub fn try_foo(x: impl Bar) {}
71    |                        ^^^ required by this bound in `try_foo`
72
73 error: aborting due to 4 previous errors
74
75 For more information about this error, try `rustc --explain E0277`.