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
|
@ -778,7 +778,9 @@ impl Visitor<'_> for CanConstProp {
|
|||
// mutations of the same local via `Store`
|
||||
| MutatingUse(MutatingUseContext::Call)
|
||||
| MutatingUse(MutatingUseContext::AsmOutput)
|
||||
| MutatingUse(MutatingUseContext::Deinit)
|
||||
// Actual store that can possibly even propagate a value
|
||||
| MutatingUse(MutatingUseContext::SetDiscriminant)
|
||||
| MutatingUse(MutatingUseContext::Store) => {
|
||||
if !self.found_assignment.insert(local) {
|
||||
match &mut self.can_const_prop[local] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue