rust/compiler/rustc_codegen_ssa
bors f5e2df741b Auto merge of #147687 - cjgillot:noshallow-init-box, r=nnethercote
Forbid ShallowInitBox after box deref elaboration.

MIR currently contains a `ShallowInitBox` rvalue. Its principal usage is to allow for in-place initialization of boxes. Having it is necessary for drop elaboration to be correct with that in-place initialization.

As part of analysis->runtime MIR lowering, we canonicalize deref of boxes to use the stored raw pointer. But we did not perform the same change to the construction of the box.

This PR replaces `ShallowInitBox` by the pointer manipulation it represents.

Alternatives:
- fully remove `ShallowInitBox` and implement `Box` in-place initialization differently;
- remove the `ElaborateBoxDeref` pass and keep dereferencing `Box` in runtime MIR.
2025-10-22 09:53:50 +00:00
..
src Auto merge of #147687 - cjgillot:noshallow-init-box, r=nnethercote 2025-10-22 09:53:50 +00:00
Cargo.toml [win] Use find-msvc-tools instead of cc to find the linker and rc on Windows 2025-09-19 12:00:30 -07:00
messages.ftl Fix double error for #[no_mangle] on closures 2025-10-08 17:46:33 +02:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.