dswij f37b9c05ef
fix(transmute_ptr_to_ref): don't suggest .cast when to-type is DST (#15621)
Fixes https://github.com/rust-lang/rust-clippy/issues/13357

Determining the exact placement of the `if !to_ref_ty.is_sized()`s
required meticulously constructing the suggestion/truth table of
`is_sized`, `msrv.meets` and `has_erased_regions`. The test cases should
hopefully cover all the new combinations.

changelog: [`transmute_ptr_to_ref`]: don't suggest `.cast` when to-type
is DST
2025-09-17 13:41:48 +00:00
..