We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Deinit
SetDiscriminant
1 parent 9b6b1a6 commit 4cbe13aCopy full SHA for 4cbe13a
1 file changed
compiler/rustc_middle/src/mir/mod.rs
@@ -1588,8 +1588,15 @@ pub enum StatementKind<'tcx> {
1588
FakeRead(Box<(FakeReadCause, Place<'tcx>)>),
1589
1590
/// Write the discriminant for a variant to the enum Place.
1591
+ ///
1592
+ /// This is permitted for both generators and ADTs. This does not necessarily write to the
1593
+ /// entire place; instead, it writes to the minimum set of bytes as required by the layout for
1594
+ /// the type.
1595
SetDiscriminant { place: Box<Place<'tcx>>, variant_index: VariantIdx },
1596
1597
+ /// Deinitializes the place.
1598
1599
+ /// This writes `uninit` bytes to the entire place.
1600
Deinit(Box<Place<'tcx>>),
1601
1602
/// Start a live range for the storage of the local.
0 commit comments