rust/compiler/rustc_codegen_cranelift/src
bors 42b384ec0d Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnr
Turn ProjectionElem::Subtype into CastKind::Subtype

I noticed that drop elaboration can't, in general, handle `ProjectionElem::SubType`. It creates a disjoint move path that overlaps with other move paths. (`Subslice` does too, and I'm working on a different PR to make that special case less fragile.) If its skipped and treated as the same move path as its parent then `MovePath.place` has multiple possible projections. (It would probably make sense to remove all `Subtype` projections for the canonical place but it doesn't make sense to have this special case for a problem that doesn't actually occur in real MIR.)

The only reason this doesn't break is that `Subtype` is always the sole projection of the local its applied to. For the same reason, it works fine as a `CastKind` so I figured that makes more sense than documenting and validating this hidden invariant.

cc rust-lang/rust#112651, rust-lang/rust#133258

r? Icnr (bc you've been the main person dealing with `Subtype` it looks like)
2025-10-02 01:54:48 +00:00
..
abi remove explicit deref of AbiAlign for most methods 2025-09-28 15:02:14 -07:00
debuginfo remove explicit deref of AbiAlign for most methods 2025-09-28 15:02:14 -07:00
driver Ensure fat LTO doesn't merge everything into the allocator module 2025-09-06 13:31:41 +00:00
intrinsics atomicrmw on pointers: move integer-pointer cast hacks into backend 2025-07-23 08:32:55 +02:00
optimize Reformat use declarations. 2024-07-29 08:26:52 +10:00
allocator.rs Make __rust_alloc_error_handler_should_panic a function 2025-07-03 10:52:21 -07:00
analyze.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
base.rs Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnr 2025-10-02 01:54:48 +00:00
cast.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
codegen_f16_f128.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
codegen_i128.rs Windows x86: Change i128 to return via the vector ABI 2025-01-27 12:12:59 +00:00
common.rs Add an attribute to check the number of lanes in a SIMD vector after monomorphization 2025-09-23 20:47:34 -04:00
compiler_builtins.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
concurrency_limiter.rs Remove jobserver from Session 2024-12-13 10:21:22 +00:00
config.rs Merge commit 'ba315abda7' into sync_cg_clif-2025-03-30 2025-03-30 15:43:48 +00:00
constant.rs Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
discriminant.rs Change tag_field to FieldIdx in Variants::Multiple 2025-06-03 23:42:21 -07:00
global_asm.rs Add an attribute to check the number of lanes in a SIMD vector after monomorphization 2025-09-23 20:47:34 -04:00
inline_asm.rs Update InterpCx::project_field to take FieldIdx 2025-06-05 19:15:56 -07:00
lib.rs Add a leading dash to linker plugin arguments in the gcc codegen 2025-09-28 13:57:33 -04:00
linkage.rs Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
main_shim.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
num.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
pointer.rs Merge commit '1fa693ca44' into sync_cg_clif-2024-11-09 2024-11-09 13:48:06 +00:00
pretty_clif.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
toolchain.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
unsize.rs remove explicit deref of AbiAlign for most methods 2025-09-28 15:02:14 -07:00
unwind_module.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
value_and_place.rs Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnr 2025-10-02 01:54:48 +00:00
vtable.rs Remove support for dyn* 2025-07-01 19:00:21 +00:00