1 error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied
2 --> $DIR/trait-bounds-same-crate-name.rs:31:20
5 | ^^^ the trait `main::a::Bar` is not implemented for `Foo`
7 ::: $DIR/auxiliary/crate_a1.rs:3:24
9 LL | pub fn try_foo(x: impl Bar) {}
10 | --- required by this bound in `try_foo`
12 help: trait impl with same name found
13 --> $DIR/auxiliary/crate_a2.rs:5:1
15 LL | impl Bar for Foo {}
17 = note: perhaps two different versions of crate `crate_a2` are being used?
19 error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied
20 --> $DIR/trait-bounds-same-crate-name.rs:38:20
22 LL | a::try_foo(implements_no_traits);
23 | ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait`
25 ::: $DIR/auxiliary/crate_a1.rs:3:24
27 LL | pub fn try_foo(x: impl Bar) {}
28 | --- required by this bound in `try_foo`
30 error[E0277]: the trait bound `ImplementsWrongTraitConditionally<isize>: main::a::Bar` is not satisfied
31 --> $DIR/trait-bounds-same-crate-name.rs:45:20
33 LL | a::try_foo(other_variant_implements_mismatched_trait);
34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally<isize>`
36 ::: $DIR/auxiliary/crate_a1.rs:3:24
38 LL | pub fn try_foo(x: impl Bar) {}
39 | --- required by this bound in `try_foo`
41 help: trait impl with same name found
42 --> $DIR/auxiliary/crate_a2.rs:13:1
44 LL | impl Bar for ImplementsWrongTraitConditionally<isize> {}
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 = note: perhaps two different versions of crate `crate_a2` are being used?
48 error[E0277]: the trait bound `ImplementsTraitForUsize<isize>: main::a::Bar` is not satisfied
49 --> $DIR/trait-bounds-same-crate-name.rs:51:20
51 LL | a::try_foo(other_variant_implements_correct_trait);
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize<isize>`
54 ::: $DIR/auxiliary/crate_a1.rs:3:24
56 LL | pub fn try_foo(x: impl Bar) {}
57 | --- required by this bound in `try_foo`
59 = help: the following implementations were found:
60 <ImplementsTraitForUsize<usize> as main::a::Bar>
62 error: aborting due to 4 previous errors
64 For more information about this error, try `rustc --explain E0277`.