fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error[E0277]: the trait bound `main::a::Foo: main::a::Bar` is not satisfied 2 --> $DIR/trait-bounds-same-crate-name.rs:31:20 3 | 4LL | a::try_foo(foo); 5 | ^^^ the trait `main::a::Bar` is not implemented for `main::a::Foo` 6 | 7 ::: $DIR/auxiliary/crate_a1.rs:3:24 8 | 9LL | pub fn try_foo(x: impl Bar) {} 10 | --- required by this bound in `main::a::try_foo` 11 | 12help: trait impl with same name found 13 --> $DIR/auxiliary/crate_a2.rs:5:1 14 | 15LL | impl Bar for Foo {} 16 | ^^^^^^^^^^^^^^^^^^^ 17 = note: Perhaps two different versions of crate `crate_a2` are being used? 18 19error[E0277]: the trait bound `main::a::DoesNotImplementTrait: main::a::Bar` is not satisfied 20 --> $DIR/trait-bounds-same-crate-name.rs:38:20 21 | 22LL | 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 | 27LL | pub fn try_foo(x: impl Bar) {} 28 | --- required by this bound in `main::a::try_foo` 29 30error[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 | 33LL | 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 | 38LL | pub fn try_foo(x: impl Bar) {} 39 | --- required by this bound in `main::a::try_foo` 40 | 41help: trait impl with same name found 42 --> $DIR/auxiliary/crate_a2.rs:13:1 43 | 44LL | impl Bar for ImplementsWrongTraitConditionally<isize> {} 45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 46 = note: Perhaps two different versions of crate `crate_a2` are being used? 47 48error[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 | 51LL | 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 | 56LL | 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 62error: aborting due to 4 previous errors 63 64For more information about this error, try `rustc --explain E0277`.