Skip to content

clippy::iter_without_into_iter #379

@Nugine

Description

@Nugine
#![deny(clippy::pedantic)]

use bitflags::bitflags;

bitflags! {
    struct Foo : u32 {
        const BAR = 0;
    }
}
error: `iter` method without an `IntoIterator` impl for `&$BitFlags`
 --> src/lib.rs:5:1
  |
5 | / bitflags! {
6 | |     struct Foo : u32 {
7 | |         const BAR = 0;
8 | |     }
9 | | }
  | |_^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_without_into_iter
note: the lint level is defined here
 --> src/lib.rs:1:9
  |
1 | #![deny(clippy::pedantic)]
  |         ^^^^^^^^^^^^^^^^
  = note: `#[deny(clippy::iter_without_into_iter)]` implied by `#[deny(clippy::pedantic)]`
  = note: this error originates in the macro `__impl_public_bitflags_iter` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `iter` method without an `IntoIterator` impl for `&$BitFlags`
 --> src/lib.rs:5:1
  |
5 | / bitflags! {
6 | |     struct Foo : u32 {
7 | |         const BAR = 0;
8 | |     }
9 | | }
  | |_^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_without_into_iter
  = note: this error originates in the macro `__impl_public_bitflags_iter` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `playground` (lib) due to 2 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions