fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.4 KiB63 linesraw
1error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
2  --> $DIR/repeated-supertrait-ambig.rs:26:15
3   |
4LL |     c.same_as(22)
5   |       ------- ^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
6   |       |
7   |       required by a bound introduced by this call
8   |
9   = help: the following other types implement trait `CompareTo<T>`:
10             <i64 as CompareTo<i64>>
11             <i64 as CompareTo<u64>>
12
13error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
14  --> $DIR/repeated-supertrait-ambig.rs:30:15
15   |
16LL |     c.same_as(22)
17   |       ------- ^^ the trait `CompareTo<i32>` is not implemented for `C`
18   |       |
19   |       required by a bound introduced by this call
20   |
21help: consider further restricting this bound
22   |
23LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
24   |                               ++++++++++++++++
25
26error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
27  --> $DIR/repeated-supertrait-ambig.rs:34:6
28   |
29LL |     <dyn CompareToInts>::same_as(c, 22)
30   |      ^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
31   |
32   = help: the following other types implement trait `CompareTo<T>`:
33             <i64 as CompareTo<i64>>
34             <i64 as CompareTo<u64>>
35
36error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
37  --> $DIR/repeated-supertrait-ambig.rs:38:27
38   |
39LL |     CompareTo::same_as(c, 22)
40   |     ------------------    ^^ the trait `CompareTo<i32>` is not implemented for `C`
41   |     |
42   |     required by a bound introduced by this call
43   |
44help: consider further restricting this bound
45   |
46LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
47   |                               ++++++++++++++++
48
49error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
50  --> $DIR/repeated-supertrait-ambig.rs:42:31
51   |
52LL |     assert_eq!(22_i64.same_as(22), true);
53   |                       ------- ^^ the trait `CompareTo<i32>` is not implemented for `i64`
54   |                       |
55   |                       required by a bound introduced by this call
56   |
57   = help: the following other types implement trait `CompareTo<T>`:
58             <i64 as CompareTo<i64>>
59             <i64 as CompareTo<u64>>
60
61error: aborting due to 5 previous errors
62
63For more information about this error, try `rustc --explain E0277`.