1
Fork 0

Add new MutatatingUseContexts for deinit and SetDiscriminant

This commit is contained in:
Jakob Degen 2022-04-11 06:04:53 -04:00
parent f7ca97a209
commit 48b01a0d0e
9 changed files with 57 additions and 41 deletions

View file

@ -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")
}
}
}