about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-13 08:33:05 +0000
committerbors <bors@rust-lang.org>2023-12-13 08:33:05 +0000
commite3d2831ff4fb15520d21856c91c2d9233724bdd5 (patch)
tree000c8cea35c2f47ef6c780f48cc76d65e4d784ea /compiler/rustc_pattern_analysis/src
parentb5c0dd6da2c7388b0a1ae60632f7acd81a9ccd40 (diff)
parentaa3dc4c2253540b3c30143f7bfe59ab44bcafec0 (diff)
downloadrust-e3d2831ff4fb15520d21856c91c2d9233724bdd5.tar.gz
rust-e3d2831ff4fb15520d21856c91c2d9233724bdd5.zip
Auto merge of #118534 - RalfJung:extern-type-size-of-val, r=WaffleLapkin
codegen: panic when trying to compute size/align of extern type

The alignment is also computed when accessing a field of extern type at non-zero offset, so we also panic in that case.

Previously `size_of_val` worked because the code path there assumed that "thin pointer" means "sized". But that's not true any more with extern types. The returned size and align are just blatantly wrong, so it seems better to panic than returning wrong results. We use a non-unwinding panic since code probably does not expect size_of_val to panic.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions