@@ -20,9 +20,9 @@ declare_clippy_lint! {
20
20
/// (`for val in &iter {}`), without having to first call `iter()` or `iter_mut()`.
21
21
///
22
22
/// ### Limitations
23
- /// This lint is restricted to exported types only, because it is aimed at guiding towards an
24
- /// idiomatic, _public_ API.
25
- /// Implementing the `IntoIterator` trait when it is not needed or used anywhere doesn't help or improve the code .
23
+ /// This lint focuses on providing an idiomatic API. Therefore, it will only
24
+ /// lint on types which are accessible outside of the crate. For internal types,
25
+ /// the `IntoIterator` trait can be implemented on demand if it is actually needed .
26
26
///
27
27
/// ### Example
28
28
/// ```rust
@@ -67,10 +67,12 @@ declare_clippy_lint! {
67
67
/// in case of ambiguity with another `IntoIterator` impl.
68
68
///
69
69
/// ### Limitations
70
- /// This lint is restricted to exported types only, because it is aimed at guiding towards an
71
- /// idiomatic, _public_ API.
72
- /// Adding an `iter` or `iter_mut` for private types when it is not needed or used doesn't improve code,
73
- /// and in fact, is linted against by the `dead_code` lint.
70
+ /// This lint focuses on providing an idiomatic API. Therefore, it will only
71
+ /// lint on types which are accessible outside of the crate. For internal types,
72
+ /// these methods can be added on demand if they are actually needed. Otherwise,
73
+ /// it would trigger the [`dead_code`] lint for the unused method.
74
+ ///
75
+ /// [`dead_code`]: https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#dead-code
74
76
///
75
77
/// ### Example
76
78
/// ```rust
0 commit comments