You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For reasons that escape me, trying to instantiate a filter causes a compilation error saying that Filter does not implement the Deluge trait. This is contrary to Filter implementing a Deluge with the exact same parameter bounds as it is instantiated with.
It is essential we figure out why the trait cannot be instantiated and fix the root cause.
The full error message after uncommenting the test:
error[E0599]: the method `collect` exists for struct `filter::Filter<iter::Iter<std::ops::Range<{integer}>>, [closure@src/deluge_ext.rs:420:21: 420:26]>`, but its trait bounds were not satisfied
--> src/deluge_ext.rs:423:14
|
423 | .collect::<Vec<usize>>().await;
| ^^^^^^^ method cannot be called on `filter::Filter<iter::Iter<std::ops::Range<{integer}>>, [closure@src/deluge_ext.rs:420:21: 420:26]>` due to unsatisfied trait bounds
|
::: src/ops/filter.rs:4:1
|
4 | pub struct Filter<Del, F> {
| -------------------------
| |
| method `collect` not found for this struct
| doesn't satisfy `_: Deluge<'_>`
| doesn't satisfy `_: Iterator`
| doesn't satisfy `_: deluge_ext::DelugeExt<'_>`
|
note: the following trait bounds were not satisfied:
`&filter::Filter<iter::Iter<std::ops::Range<{integer}>>, [closure@src/deluge_ext.rs:420:21: 420:26]>: Deluge<'_>`
`&mut filter::Filter<iter::Iter<std::ops::Range<{integer}>>, [closure@src/deluge_ext.rs:420:21: 420:26]>: Deluge<'_>`
`filter::Filter<iter::Iter<std::ops::Range<{integer}>>, [closure@src/deluge_ext.rs:420:21: 420:26]>: Deluge<'_>`
--> src/deluge_ext.rs:7:42
|
7 | impl<'a, T> DelugeExt<'a> for T where T: Deluge<'a> {}
| ------------- - ^^^^^^^^^^ unsatisfied trait bound introduced here
= note: the following trait bounds were not satisfied:
`filter::Filter<iter::Iter<std::ops::Range<{integer}>>, [closure@src/deluge_ext.rs:420:21: 420:26]>: Iterator`
which is required by `&mut filter::Filter<iter::Iter<std::ops::Range<{integer}>>, [closure@src/deluge_ext.rs:420:21: 420:26]>: Iterator`
note: the following traits must be implemented
--> src/deluge.rs:11:1
|
11 | pub trait Deluge<'a> {
| ^^^^^^^^^^^^^^^^^^^^
|
::: /home/michal/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:67:1
|
67 | pub trait Iterator {
| ^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0599`.
error: could not compile `deluge` due to previous error
The text was updated successfully, but these errors were encountered:
For reasons that escape me, trying to instantiate a filter causes a compilation error saying that
Filter
does not implement theDeluge
trait. This is contrary toFilter
implementing aDeluge
with the exact same parameter bounds as it is instantiated with.It is essential we figure out why the trait cannot be instantiated and fix the root cause.
The full error message after uncommenting the test:
The text was updated successfully, but these errors were encountered: