Peternator7 / strum

A small rust library for adding custom derives to enums
https://crates.io/crates/strum
MIT License
1.8k stars 152 forks source link

Error updating to 0.26 - trait bound `std::iter::FusedIterator` is not satisfied #356

Closed domenukk closed 6 months ago

domenukk commented 6 months ago

While updating to 0.26, we get the following new error message:

error[E0277]: the trait bound `arch::x86_64::RegsIter: std::iter::FusedIterator` is not satisfied
   --> libafl_qemu/src/arch/x86_64.rs:13:63
    |
13  | #[derive(IntoPrimitive, TryFromPrimitive, Debug, Clone, Copy, EnumIter)]
    |                                                               ^^^^^^^^
    |                                                               |
    |                                                               the trait `std::iter::FusedIterator` is not implemented for `arch::x86_64::RegsIter`
    |                                                               in this derive macro expansion
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum_macros-0.25.3/src/lib.rs:378:1
    |
378 | pub fn enum_iter(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    | --------------------------------------------------------------------------- in this expansion of `#[derive(EnumIter)]`
    |
note: required by a bound in `strum::IntoEnumIterator::Iterator`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum-0.26.2/src/lib.rs:105:11
    |
101 |     type Iterator: Iterator<Item = Self>
    |          -------- required by a bound in this associated type
...
105 |         + FusedIterator;
    |           ^^^^^^^^^^^^^ required by this bound in `IntoEnumIterator::Iterator`

see https://github.com/AFLplusplus/LibAFL/pull/2173#issuecomment-2108659455

Could this be related to #311 ? Any idea how to approach /debug this?

domenukk commented 6 months ago

It was an old version of strum_macros, thanks!