Open
Description
This is a tracking issue for the lint invalid_reference_casting
, which was uplifted from Clippy's cast_ref_to_mut
lint in #111567.
This lint is deny-by-default, i.e. #![deny(invalid_reference_casting)]
.
Status
This lint was uplifted directly from Clippy, but shortly after that a bug in the lint was reported: #124685. Currently we are working on eliminating all forms of this issue.
Steps
- @saethlin is doing some investigation into how this lint is tripped across the ecosystem by crawling crater results.
Open Questions
The lint currently hunts for an expression that represents the backing allocation, then if it encounters a pattern known to produce false positives, we punt on reporting that case. Should we invert the logic and be silent by default instead?