|
1 | 1 | error[E0277]: the trait bound `main::a::Foo: main::a::Bar` is not satisfied
|
2 |
| - --> $DIR/trait-bounds-same-crate-name.rs:16:20 |
| 2 | + --> $DIR/trait-bounds-same-crate-name.rs:31:20 |
3 | 3 | |
|
4 |
| -LL | a::try_foo(foo2); |
5 |
| - | ^^^^ the trait `main::a::Bar` is not implemented for `main::a::Foo` |
| 4 | +LL | a::try_foo(foo); |
| 5 | + | ^^^ the trait `main::a::Bar` is not implemented for `main::a::Foo` |
6 | 6 | |
|
7 |
| - ::: $DIR/auxiliary/crate_a1.rs:5:24 |
| 7 | + ::: $DIR/auxiliary/crate_a1.rs:3:24 |
8 | 8 | |
|
9 |
| -LL | pub fn try_foo(x: impl Bar){} |
| 9 | +LL | pub fn try_foo(x: impl Bar) {} |
10 | 10 | | --- required by this bound in `main::a::try_foo`
|
11 | 11 | |
|
12 |
| -help: Trait impl with same name found |
| 12 | +help: trait impl with same name found |
13 | 13 | --> $DIR/auxiliary/crate_a2.rs:5:1
|
14 | 14 | |
|
15 | 15 | LL | impl Bar for Foo {}
|
16 | 16 | | ^^^^^^^^^^^^^^^^^^^
|
17 | 17 | = note: Perhaps two different versions of crate `crate_a2` are being used?
|
18 | 18 |
|
19 |
| -error: aborting due to previous error |
| 19 | +error[E0277]: the trait bound `main::a::DoesNotImplementTrait: main::a::Bar` is not satisfied |
| 20 | + --> $DIR/trait-bounds-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 `main::a::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 `main::a::try_foo` |
| 29 | + |
| 30 | +error[E0277]: the trait bound `main::a::ImplementsWrongTraitConditionally<isize>: main::a::Bar` is not satisfied |
| 31 | + --> $DIR/trait-bounds-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 `main::a::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 `main::a::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 `main::a::ImplementsTraitForUsize<isize>: main::a::Bar` is not satisfied |
| 49 | + --> $DIR/trait-bounds-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 `main::a::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 `main::a::try_foo` |
| 58 | + | |
| 59 | + = help: the following implementations were found: |
| 60 | + <main::a::ImplementsTraitForUsize<usize> as main::a::Bar> |
| 61 | + |
| 62 | +error: aborting due to 4 previous errors |
20 | 63 |
|
21 | 64 | For more information about this error, try `rustc --explain E0277`.
|
0 commit comments