Skip to content

Commit f908391

Browse files
Rollup merge of #96400 - JakobDegen:shallow-init-docs, r=Dylan-DPC
Correct documentation for `Rvalue::ShallowInitBox` As a part of the big MIR docs PR, I had added a comment indicating that `Rvalue::ShallowInitBox` is disallowed after drop elaboration, but this is not true (no idea why I thought it was). Codegen has support for it, and trying to enforce this rule in the validator causes compiling core to ICE on the very first `box` statement. That being said, this `Rvalue` probably *should* be banned after drop elaboration - it doesn't seem like it's still useful for much. However, I do not have time right now to actually go investigate how difficult a change that is to make, so in the meantime fixing the docs to reflect the current situation seems like the right step. r? rust-lang/mir-opt
2 parents a818173 + 941e194 commit f908391

File tree

1 file changed

+0
-2
lines changed
  • compiler/rustc_middle/src/mir

1 file changed

+0
-2
lines changed

compiler/rustc_middle/src/mir/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2581,8 +2581,6 @@ pub enum Rvalue<'tcx> {
25812581
/// This is different from a normal transmute because dataflow analysis will treat the box as
25822582
/// initialized but its content as uninitialized. Like other pointer casts, this in general
25832583
/// affects alias analysis.
2584-
///
2585-
/// Disallowed after drop elaboration.
25862584
ShallowInitBox(Operand<'tcx>, Ty<'tcx>),
25872585
}
25882586

0 commit comments

Comments
 (0)