Clippy fix makes breaking change on warning: usage of contains_key
followed by insert
on a HashMap
#13649
Labels
C-bug
Category: Clippy is not doing the correct thing
Summary
Clippy attempts to fix the warning: usage of
contains_key
followed byinsert
on aHashMap
and creates a borrow after move.
Original:
Clippy Fixed:
The Clippy generated code results in name being moved by HashMap::Entry before being borrowed by format!.
Version
rustc 1.81.0 (eeb90cda1 2024-09-04)
binary: rustc
commit-hash: eeb90cda1969383f56a2637cbd3037bdf598841c
commit-date: 2024-09-04
host: aarch64-apple-darwin
release: 1.81.0
LLVM version: 18.1.7
Additional Labels
No response
The text was updated successfully, but these errors were encountered: