summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr
blob: cab0ccdf710da0c6af89c23b9d5ba1f08a0c36f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
  --> $DIR/repeated-supertrait-ambig.rs:26:7
   |
LL |     c.same_as(22)
   |       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
   |
   = help: the following other types implement trait `CompareTo<T>`:
             <i64 as CompareTo<i64>>
             <i64 as CompareTo<u64>>

error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
  --> $DIR/repeated-supertrait-ambig.rs:30:7
   |
LL |     c.same_as(22)
   |       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
   |
help: consider further restricting this bound
   |
LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
   |                               ++++++++++++++++

error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
  --> $DIR/repeated-supertrait-ambig.rs:34:5
   |
LL |     <dyn CompareToInts>::same_as(c, 22)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
   |
   = help: the following other types implement trait `CompareTo<T>`:
             <i64 as CompareTo<i64>>
             <i64 as CompareTo<u64>>

error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
  --> $DIR/repeated-supertrait-ambig.rs:38:5
   |
LL |     CompareTo::same_as(c, 22)
   |     ^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
   |
help: consider further restricting this bound
   |
LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
   |                               ++++++++++++++++

error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
  --> $DIR/repeated-supertrait-ambig.rs:42:23
   |
LL |     assert_eq!(22_i64.same_as(22), true);
   |                       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `i64`
   |
   = help: the following other types implement trait `CompareTo<T>`:
             <i64 as CompareTo<i64>>
             <i64 as CompareTo<u64>>

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0277`.