rust/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr

53 lines
2.2 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:36:7
|
LL | c.same_as(22) //~ ERROR `dyn CompareToInts: CompareTo<i32>` is not satisfied
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:40:7
|
LL | c.same_as(22) //~ ERROR `C: CompareTo<i32>` is not satisfied
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
|
= help: consider adding a `where C: CompareTo<i32>` bound
error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:44:5
|
LL | CompareToInts::same_as(c, 22) //~ ERROR `dyn CompareToInts: CompareTo<i32>` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
|
note: required by `CompareTo::same_as`
--> $DIR/traits-repeated-supertrait-ambig.rs:19:5
|
LL | fn same_as(&self, t: T) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:48:5
|
LL | CompareTo::same_as(c, 22) //~ ERROR `C: CompareTo<i32>` is not satisfied
| ^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
|
= help: consider adding a `where C: CompareTo<i32>` bound
note: required by `CompareTo::same_as`
--> $DIR/traits-repeated-supertrait-ambig.rs:19:5
|
LL | fn same_as(&self, t: T) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:52:23
|
LL | assert_eq!(22_i64.same_as(22), true); //~ ERROR `i64: CompareTo<i32>` is not satisfied
| ^^^^^^^ 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`.