rust/compiler/rustc_codegen_ssa/src
bors 2fdd9eda0c 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.
2023-12-13 08:33:05 +00:00
..
back Auto merge of #118344 - saethlin:rmeta-header-pos, r=WaffleLapkin 2023-12-11 17:21:14 +00:00
debuginfo Implement async gen blocks 2023-12-08 17:23:25 +00:00
mir reject projecting to fields whose offset we cannot compute 2023-12-12 08:15:17 +01:00
traits Move MetadataLoader{,Dyn} to rustc_metadata. 2023-11-30 17:05:54 +11:00
assert_module_sources.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
base.rs Auto merge of #113923 - DianQK:restore-no-builtins-lto, r=pnkfelix 2023-12-01 21:45:18 +00:00
codegen_attrs.rs Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
common.rs move ConstValue into mir 2023-09-19 11:11:02 +02:00
errors.rs Remove cgu_reuse_tracker from Session 2023-10-09 18:39:41 +00:00
lib.rs codegen: panic when trying to compute size/align of extern type 2023-12-12 08:15:17 +01:00
meth.rs cg_ssa: remove pointee types and pointercast/bitcast-of-ptr 2023-07-29 13:18:20 -04:00
mono_item.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
size_of_val.rs codegen: panic when trying to compute size/align of extern type 2023-12-12 08:15:17 +01:00
target_features.rs update target feature following LLVM API change 2023-12-08 13:06:07 +00:00