3

Improve accuracy of `mut_key` by kneasle · Pull Request #7640 · rust-lang/rust-c...

 2 years ago
source link: https://github.com/rust-lang/rust-clippy/pull/7640
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Contributor

kneasle commented on Sep 5

edited

Fixes #6745.

Whilst writing the tests for this, I noticed what I believe is a false negative (the code in @xFrednet's comment doesn't trigger the lint). Currently the tests contain a case for this (which is blatantly ignored), but I'm not at all sure how to implement this (since the lint currently behaves completely differently for ADTs). I'm not sure what should be done - on the one hand the extra test cases are misleading, but on the other hand they don't cause much harm and would save effort for anyone fixing that false negative.


changelog: Improve accuracy of clippy::mutable_key_type.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK