fix ICE in `cast_slice_different_sizes` fixes #8708 changelog: fixes an ICE introduced in #8445
This crate contains Clippy lints. For the main crate, check GitHub.