Don't give invalid suggestions in array_into_iter.
This commit is contained in:
parent
422ad3bec2
commit
90080f4703
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ impl<'tcx> LateLintPass<'tcx> for ArrayIntoIter {
|
||||||
String::new(),
|
String::new(),
|
||||||
Applicability::MaybeIncorrect,
|
Applicability::MaybeIncorrect,
|
||||||
);
|
);
|
||||||
} else {
|
} else if receiver_ty.is_array() {
|
||||||
diag.multipart_suggestion(
|
diag.multipart_suggestion(
|
||||||
"or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value",
|
"or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value",
|
||||||
vec![
|
vec![
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue