Why do I get the "identical conversion" clippy lint in a for loop?

Hi, I get the identical conversion clippy lint in the following for loop:

for (m, board) in determine_all_moves(board)? {
    println!("Moves: {:?}, board: {}", m, board);


fn determine_all_moves<T: ...>(board: T) -> Result<Vec<..>, PacoError>

Is that a false positive or am I missing something?

Not enough information to tell, what is it highlighting for the lint? Nothing you have shown looks like it would trigger it.


That seems weird, I don’t know what is triggering clippy. I don’t see any into, from, or into_iter, which are the only things which would trigger it.

There’s one implicitly in the desugaring of expr? (which is precicely what the span points to), but the lint shouldn’t be firing there…

Then I’ll try to reduce it to a minimal example and submit a clippy issue later.

Try the latest nightly, if this recently added test case tells us anything…


Yes, running the latest nightly clippy does indeed fix the issue.