about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-08 17:03:09 +0200
committerGitHub <noreply@github.com>2024-05-08 17:03:09 +0200
commit9fce3dc685f66ccaa9d3b25c7ca9983c60d7b263 (patch)
tree387ea725d0ec83527eed84b4d304448e6f007acb /library/std/src
parente997508ecb3484a2ee1a62c89ce03353bc237e1d (diff)
parentcd6a0c8c77575056f95d79ae1f5c460794e1388f (diff)
downloadrust-9fce3dc685f66ccaa9d3b25c7ca9983c60d7b263.tar.gz
rust-9fce3dc685f66ccaa9d3b25c7ca9983c60d7b263.zip
Rollup merge of #124761 - Urgau:ref-casting_bigger_slice_index, r=jieyouxu
Fix insufficient logic when searching for the underlying allocation

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]` that `slice[index]` was the allocation, but it's not.

Fixes https://github.com/rust-lang/rust/issues/124685
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions