unnecessary_to_owned
suggestion causes error when iterator is re-borrowed mutably within a loop
#8148
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
When running:
On https://github.com/ZcashFoundation/zebra/tree/410133435e875336875aab32c338a284470ceab4/zebra-chain
I get an error:
Lint Name
unnecessary_to_owned
Reproducer
I tried this code:
https://github.com/ZcashFoundation/zebra/blob/410133435e875336875aab32c338a284470ceab4/zebra-chain/src/block/arbitrary.rs#L554-L578
I saw this happen:
I expected to see this happen:
Either no lint, or a fix that compiles correctly.
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: