We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a356785 commit a3ef100Copy full SHA for a3ef100
clippy_lints/src/needless_for_each.rs
@@ -35,6 +35,16 @@ declare_clippy_lint! {
35
/// println!("{}", elem);
36
/// }
37
/// ```
38
+ ///
39
+ /// ### Known Problems
40
+ /// When doing things such as:
41
+ /// ```ignore
42
+ /// let v = vec![0, 1, 2];
43
+ /// v.iter().for_each(|elem| unsafe {
44
+ /// libc::printf(c"%d\n".as_ptr(), elem);
45
+ /// });
46
+ /// ```
47
+ /// This lint will not trigger.
48
#[clippy::version = "1.53.0"]
49
pub NEEDLESS_FOR_EACH,
50
pedantic,
0 commit comments