about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/layout.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-29 05:36:44 +0000
committerbors <bors@rust-lang.org>2025-04-29 05:36:44 +0000
commit4c83e55e2d88ff93155be2784b9f64b91b870e99 (patch)
treea30af0c932392e54d81d8a992b629ad043a8b663 /compiler/rustc_ty_utils/src/layout.rs
parent1b8ab72680f36e783af84c1a3c4f8508572bd9f9 (diff)
parent7082fa27a792e34a9474db396ccf3958143211af (diff)
downloadrust-4c83e55e2d88ff93155be2784b9f64b91b870e99.tar.gz
rust-4c83e55e2d88ff93155be2784b9f64b91b870e99.zip
Auto merge of #137940 - 1c3t3a:alignment-borrows-check, r=saethlin
Extend the alignment check to borrows

The current alignment check does not include checks for creating misaligned references from raw pointers, which is now added in this patch.

When inserting the check we need to be careful with references to field projections (e.g. `&(*ptr).a`), in which case the resulting reference must be aligned according to the field type and not the type of the pointer.

r? `@saethlin`

cc `@RalfJung,` after our discussion in #134424
Diffstat (limited to 'compiler/rustc_ty_utils/src/layout.rs')
0 files changed, 0 insertions, 0 deletions