Add new MutatatingUseContext
s for deinit and SetDiscriminant
This commit is contained in:
parent
f7ca97a209
commit
48b01a0d0e
9 changed files with 57 additions and 41 deletions
|
@ -72,5 +72,9 @@ pub fn categorize(context: PlaceContext) -> Option<DefUse> {
|
|||
|
||||
// Debug info is neither def nor use.
|
||||
PlaceContext::NonUse(NonUseContext::VarDebugInfo) => None,
|
||||
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Deinit | MutatingUseContext::SetDiscriminant) => {
|
||||
bug!("These statements are not allowed in this MIR phase")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue