2018-08-08 14:28:26 +02:00
|
|
|
error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
|
2021-02-08 23:15:45 +01:00
|
|
|
--> $DIR/repeated-supertrait-ambig.rs:26:7
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 13:03:44 +01:00
|
|
|
LL | c.same_as(22)
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
|
2021-02-08 23:15:45 +01:00
|
|
|
--> $DIR/repeated-supertrait-ambig.rs:30:7
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 13:03:44 +01:00
|
|
|
LL | c.same_as(22)
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
|
2019-12-26 13:43:33 +01:00
|
|
|
|
|
2020-03-14 03:28:14 +01:00
|
|
|
help: consider further restricting this bound
|
2019-12-26 13:43:33 +01:00
|
|
|
|
|
2020-03-14 03:28:14 +01:00
|
|
|
LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
|
2021-02-08 23:15:45 +01:00
|
|
|
--> $DIR/repeated-supertrait-ambig.rs:34:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-08-24 23:44:43 +02:00
|
|
|
LL | fn same_as(&self, t: T) -> bool;
|
|
|
|
| -------------------------------- required by `CompareTo::same_as`
|
|
|
|
...
|
2021-03-07 16:47:39 +01:00
|
|
|
LL | <dyn CompareToInts>::same_as(c, 22)
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
|
2021-02-08 23:15:45 +01:00
|
|
|
--> $DIR/repeated-supertrait-ambig.rs:38:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-08-24 23:44:43 +02:00
|
|
|
LL | fn same_as(&self, t: T) -> bool;
|
|
|
|
| -------------------------------- required by `CompareTo::same_as`
|
|
|
|
...
|
2019-03-09 13:03:44 +01:00
|
|
|
LL | CompareTo::same_as(c, 22)
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
|
2019-12-26 13:43:33 +01:00
|
|
|
|
|
2020-03-14 03:28:14 +01:00
|
|
|
help: consider further restricting this bound
|
2019-12-26 13:43:33 +01:00
|
|
|
|
|
2020-03-14 03:28:14 +01:00
|
|
|
LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
|
2021-02-08 23:15:45 +01:00
|
|
|
--> $DIR/repeated-supertrait-ambig.rs:42:23
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 13:03:44 +01:00
|
|
|
LL | assert_eq!(22_i64.same_as(22), true);
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `i64`
|
|
|
|
|
|
|
|
|
= help: the following implementations were found:
|
|
|
|
<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`.
|