Clippy fired iter_kv_map to fix the following:
use std::collections::BTreeMap;
fn f(d: &BTreeMap<u64, Vec<&'static str>>) {
let it = d.iter().flat_map(|(_, e)| e); // <- `iter_kv_map`
for i in it {
println!("{i}");
}
}
into the following:
But it is wrong. I guess the expected result would be:
instead ?
Possibly related: #16515 ?
$ rustc -Vv
rustc 1.96.0-nightly (1e2183119 2026-03-15)
binary: rustc
commit-hash: 1e2183119f0ee19cc26df899e26b04ad0de3475d
commit-date: 2026-03-15
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.0
Clippy fired
iter_kv_mapto fix the following:into the following:
But it is wrong. I guess the expected result would be:
instead ?
Possibly related: #16515 ?