Document semantics of Deinit
and SetDiscriminant
MIR statements
This commit is contained in:
parent
9b6b1a625b
commit
4cbe13adab
1 changed files with 7 additions and 0 deletions
|
@ -1588,8 +1588,15 @@ pub enum StatementKind<'tcx> {
|
|||
FakeRead(Box<(FakeReadCause, Place<'tcx>)>),
|
||||
|
||||
/// Write the discriminant for a variant to the enum Place.
|
||||
///
|
||||
/// This is permitted for both generators and ADTs. This does not necessarily write to the
|
||||
/// entire place; instead, it writes to the minimum set of bytes as required by the layout for
|
||||
/// the type.
|
||||
SetDiscriminant { place: Box<Place<'tcx>>, variant_index: VariantIdx },
|
||||
|
||||
/// Deinitializes the place.
|
||||
///
|
||||
/// This writes `uninit` bytes to the entire place.
|
||||
Deinit(Box<Place<'tcx>>),
|
||||
|
||||
/// Start a live range for the storage of the local.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue