fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
2.0 KiB47 linesraw
1error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
2  --> $DIR/traits-repeated-supertrait-ambig.rs:26:7
3   |
4LL |     c.same_as(22)
5   |       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
6
7error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
8  --> $DIR/traits-repeated-supertrait-ambig.rs:30:7
9   |
10LL | fn with_trait<C:CompareToInts>(c: &C) -> bool {
11   |               -- help: consider further restricting this bound: `C: CompareTo<i32> +`
12LL |     c.same_as(22)
13   |       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
14
15error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
16  --> $DIR/traits-repeated-supertrait-ambig.rs:34:5
17   |
18LL |     fn same_as(&self, t: T) -> bool;
19   |     -------------------------------- required by `CompareTo::same_as`
20...
21LL |     CompareToInts::same_as(c, 22)
22   |     ^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
23
24error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
25  --> $DIR/traits-repeated-supertrait-ambig.rs:38:5
26   |
27LL |     fn same_as(&self, t: T) -> bool;
28   |     -------------------------------- required by `CompareTo::same_as`
29...
30LL | fn with_ufcs2<C:CompareToInts>(c: &C) -> bool {
31   |               -- help: consider further restricting this bound: `C: CompareTo<i32> +`
32LL |     CompareTo::same_as(c, 22)
33   |     ^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
34
35error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
36  --> $DIR/traits-repeated-supertrait-ambig.rs:42:23
37   |
38LL |     assert_eq!(22_i64.same_as(22), true);
39   |                       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `i64`
40   |
41   = help: the following implementations were found:
42             <i64 as CompareTo<i64>>
43             <i64 as CompareTo<u64>>
44
45error: aborting due to 5 previous errors
46
47For more information about this error, try `rustc --explain E0277`.