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 422ad3b commit 90080f4Copy full SHA for 90080f4
compiler/rustc_lint/src/array_into_iter.rs
@@ -141,7 +141,7 @@ impl<'tcx> LateLintPass<'tcx> for ArrayIntoIter {
141
String::new(),
142
Applicability::MaybeIncorrect,
143
);
144
- } else {
+ } else if receiver_ty.is_array() {
145
diag.multipart_suggestion(
146
"or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value",
147
vec![
0 commit comments