fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

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