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
error[E0277]: the trait bound `(): std::iter::Iterator` is not satisfied
--> src/main.rs:3:54
|
3 | fn running_count(iter: impl Iterator<Item = u32>) -> impl Iterator<Item = u32> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator; maybe try calling `.iter()` or a similar method
|
= help: the trait `std::iter::Iterator` is not implemented for `()`
= note: the return type of a function must have a statically known size
The text was updated successfully, but these errors were encountered:
Similarly (which I think is the root cause), this fails:
#![crate_type = "lib"]#![feature(conservative_impl_trait, universal_impl_trait)]#![feature(never_type)]traitT{}fnf(x: !) -> implT{
x // ^^^^^^ the trait `T` is not implemented for `!`}
I.e. ! cannot be coerced into impl Trait for any trait.
This is a bit annoying:
The text was updated successfully, but these errors were encountered: