You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, where an IntoIterator is expected such as in Iterator::zip, if x.into_iter() is supplied then this lint can be triggered. But the fix does not account for cases where x is getting auto-Deref to invoke (*x).into_iter(). So x is the suggested fix, but *x is the correct fix.
Reproducer
I tried this code:
let x = &[1];let y = &&[2];let _ = x.iter().zip(y.into_iter());
I expected to see this happen:
valid fix, or no fix at all. (example of valid fix: replace y.into_iter() with *y)
Instead, this happened:
invalid fix, attempting to replace y.into_iter() with y.