Closed Urgau closed 1 week ago
r? @jieyouxu
rustbot has assigned @jieyouxu. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
Thanks!
@bors r+ rollup
This PR fixes the logic inside the
invalid_reference_casting
lint, when trying to lint on bigger memory layout casts.More specifically when looking for the "underlying allocation" we were wrongly assuming that when we got
&mut slice[index]
thatslice[index]
was the allocation, but it's not.Fixes https://github.com/rust-lang/rust/issues/124685