Ignore into_iter_without_iter pedantic clippy lint

warning: `IntoIterator` implemented for a reference type without an `iter` method
       --> syntax/types.rs:275:1
        |
    275 | / impl<'t, 'a> IntoIterator for &'t Types<'a> {
    276 | |     type Item = &'a Type;
    277 | |     type IntoIter = crate::syntax::set::Iter<'t, 'a, Type>;
    278 | |     fn into_iter(self) -> Self::IntoIter {
    279 | |         self.all.into_iter()
    280 | |     }
    281 | | }
        | |_^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_without_iter
        = note: `-W clippy::into-iter-without-iter` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::into_iter_without_iter)]`
    help: consider implementing `iter`
        |
    275 +
    276 + impl Types<'a> {
    277 +     fn iter(&self) -> crate::syntax::set::Iter<'t, 'a, Type> {
    278 +         <&Self as IntoIterator>::into_iter(self)
    279 +     }
    280 + }
        |
This commit is contained in:
David Tolnay 2023-10-06 22:25:50 -04:00
parent d5bf2ded2b
commit ba26443538
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
4 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,7 @@
clippy::explicit_auto_deref,
clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::match_bool,
clippy::match_on_vec_items,

View File

@ -6,6 +6,7 @@
clippy::enum_glob_use,
clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::large_enum_variant,
clippy::match_bool,

View File

@ -17,6 +17,7 @@
clippy::enum_glob_use,
clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::match_bool,
clippy::match_on_vec_items,

View File

@ -6,6 +6,7 @@
clippy::enum_glob_use,
clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::large_enum_variant,
clippy::match_bool,