Error[E0599]: the method `partial_cmp` exists for reference `&Object`, but its

trait bounds were not satisfied
--> src/vm/atom.rs:41:64
|
41 | (Tag::Obj, Tag::Obj) => unsafe { (&*self.as_obj()).partial_cmp(&*other.as_obj()) },
| ^^^^^^^^^^^ method cannot be called on `&Object` due to unsatisfied trait bounds
...
202 | pub struct Object {
| -----------------
| |
| doesn't satisfy `Object: Iterator`
| doesn't satisfy `Object: PartialOrd<_>`
|
note: the following trait bounds were not satisfied because of the requirements of the implementation of `PartialOrd<_>` for `_`:
`Object: PartialOrd<_>`
--> src/vm/atom.rs:22:6
|
22 | impl PartialOrd for Atom {
| ^^^^^^^^^^ ^^^^
= note: the following trait bounds were not satisfied:
`&Object: Iterator`
which is required by `&mut &Object: Iterator`
`Object: Iterator`
which is required by `&mut Object: Iterator`
note: the following trait must be implemented
--> /home/johnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:56:1
|
56 | / pub trait Iterator {
57 | | /// The type of the elements being iterated over.
58 | | #[stable(feature = "rust1", since = "1.0.0")]
59 | | type Item;
... |
3672 | | }
3673 | | }
| |_^
help: consider annotating `Object` with `#[derive(PartialEq, PartialOrd)]`
|
202 | #[derive(PartialEq, PartialOrd)]
|

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

Объясните, откуда взялся баунд Object: Iterator? В коде его нигде нет, вся ошибка на практике в том что Object: !PartialOrd

2 ответов

13 просмотров

кто-то сделал импл Ord с баундом Iterator, навеное

Cуществует метод Iterator::partial_cmp

Похожие вопросы

Обсуждают сегодня

Сonst magicTgHTML = (text, entities) => { let processedText = text; let offsetShift = 0; entities.forEach(entity => { const { offset, length, type, url, ...
Андрей
1
а что делать если тебя убивают на картах?
Yarik yarik kyda ti lezesh
43
Как с помощью opencv найти ракету на картинке?))
ᅠ [ Кому не ответил, дублируйте ]
2
Мне вот что интересно, кто на рфе стартовал/играл, что вы фармили, в каком виде контента он прямо хорош? Экспедиция? Вроде прямо на замазанных мапах рф сдувается
Владислав
20
‌/r/pathofexile moderation changes top scoring links : pathofexile (RSS) Hi, everyone. On behalf of the subreddit mod team, I’m here to give you a few updates on the subreddi...
Esionru
3
Подскажите где можно прочитать про реализацию возможности писать человеку при подписке на телеграм канал от имени бота? Было бы не плохо если для Telegraf@3.38.0
Pan Lipton
10
У меня вопрос к знающими, стоит ли вступать в гильдии в игре или лучше полная свобода?
Енот Полоскун
17
У вас бывает ощущение, что хочется потратить весь отпуск на то, чтоб только спать?
Николай
15
Как можно настроить фильтр в пое под себя?
Yarik yarik kyda ti lezesh
15
Кто нибудь поясните это всё таки вброс или да? Про санктум слышал на поедб вбросили, а по дурке откуда инфа и на сколько это вообще правда? Пахнет шизофренией какой-то ✅Divi...
Dmitry Ritter
9
Карта сайта