mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
More accurately check for interior mutability in `invalid_reference_casting` lint This PR replaces the `Freeze` trait check in the `invalid_reference_casting` lint by a recursive type check. The check was not enough to determine if a type has "interior mutability", as `Freeze` is proxy for "has *some* interior mutability", not "fully covered by interior mutability". As requested in https://github.com/rust-lang/rust/pull/159960#issuecomment-5090709661