Skip to content

Commit

Permalink
warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bend-n committed May 1, 2024
1 parent a356785 commit a3ef100
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clippy_lints/src/needless_for_each.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ declare_clippy_lint! {
/// println!("{}", elem);
/// }
/// ```
///
/// ### Known Problems
/// When doing things such as:
/// ```ignore
/// let v = vec![0, 1, 2];
/// v.iter().for_each(|elem| unsafe {
/// libc::printf(c"%d\n".as_ptr(), elem);
/// });
/// ```
/// This lint will not trigger.
#[clippy::version = "1.53.0"]
pub NEEDLESS_FOR_EACH,
pedantic,
Expand Down

0 comments on commit a3ef100

Please sign in to comment.