rust/tests/ui/traits/inheritance/repeated-supertrait-ambig.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
2.5 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/repeated-supertrait-ambig.rs:26:15
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | c.same_as(22)
| ------- ^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `CompareTo<T>`:
<i64 as CompareTo<i64>>
<i64 as CompareTo<u64>>
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/repeated-supertrait-ambig.rs:30:15
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | c.same_as(22)
| ------- ^^ the trait `CompareTo<i32>` is not implemented for `C`
| |
| required by a bound introduced by this call
|
help: consider further restricting this bound
|
LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
| ++++++++++++++++
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
--> $DIR/repeated-supertrait-ambig.rs:34:37
2018-08-08 07:28:26 -05:00
|
LL | <dyn CompareToInts>::same_as(c, 22)
| ---------------------------- ^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
2022-08-16 18:13:23 -05:00
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `CompareTo<T>`:
<i64 as CompareTo<i64>>
<i64 as CompareTo<u64>>
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/repeated-supertrait-ambig.rs:38:27
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | CompareTo::same_as(c, 22)
| ------------------ ^^ the trait `CompareTo<i32>` is not implemented for `C`
2022-08-16 01:27:22 -05:00
| |
| required by a bound introduced by this call
|
help: consider further restricting this bound
|
LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
| ++++++++++++++++
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
--> $DIR/repeated-supertrait-ambig.rs:42:31
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | assert_eq!(22_i64.same_as(22), true);
| ------- ^^ the trait `CompareTo<i32>` is not implemented for `i64`
| |
| required by a bound introduced by this call
2018-08-08 07:28:26 -05:00
|
= help: the following other types implement trait `CompareTo<T>`:
2018-08-08 07:28:26 -05:00
<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`.