]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/bound/same-crate-name.stderr
Auto merge of #84959 - camsteffen:lint-suggest-group, r=estebank
[rust.git] / src / test / 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   ::: $DIR/auxiliary/crate_a1.rs:3:24
8    |
9 LL | pub fn try_foo(x: impl Bar) {}
10    |                        --- required by this bound in `try_foo`
11    |
12 help: trait impl with same name found
13   --> $DIR/auxiliary/crate_a2.rs:5:1
14    |
15 LL | impl Bar for Foo {}
16    | ^^^^^^^^^^^^^^^^^^^
17    = note: perhaps two different versions of crate `crate_a2` are being used?
18
19 error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied
20   --> $DIR/same-crate-name.rs:38:20
21    |
22 LL |         a::try_foo(implements_no_traits);
23    |                    ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait`
24    | 
25   ::: $DIR/auxiliary/crate_a1.rs:3:24
26    |
27 LL | pub fn try_foo(x: impl Bar) {}
28    |                        --- required by this bound in `try_foo`
29
30 error[E0277]: the trait bound `ImplementsWrongTraitConditionally<isize>: main::a::Bar` is not satisfied
31   --> $DIR/same-crate-name.rs:45:20
32    |
33 LL |         a::try_foo(other_variant_implements_mismatched_trait);
34    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally<isize>`
35    | 
36   ::: $DIR/auxiliary/crate_a1.rs:3:24
37    |
38 LL | pub fn try_foo(x: impl Bar) {}
39    |                        --- required by this bound in `try_foo`
40    |
41 help: trait impl with same name found
42   --> $DIR/auxiliary/crate_a2.rs:13:1
43    |
44 LL | impl Bar for ImplementsWrongTraitConditionally<isize> {}
45    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46    = note: perhaps two different versions of crate `crate_a2` are being used?
47
48 error[E0277]: the trait bound `ImplementsTraitForUsize<isize>: main::a::Bar` is not satisfied
49   --> $DIR/same-crate-name.rs:51:20
50    |
51 LL |         a::try_foo(other_variant_implements_correct_trait);
52    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize<isize>`
53    | 
54   ::: $DIR/auxiliary/crate_a1.rs:3:24
55    |
56 LL | pub fn try_foo(x: impl Bar) {}
57    |                        --- required by this bound in `try_foo`
58    |
59    = help: the following implementations were found:
60              <ImplementsTraitForUsize<usize> as main::a::Bar>
61
62 error: aborting due to 4 previous errors
63
64 For more information about this error, try `rustc --explain E0277`.