Change way of checking SetDiscriminant
This commit is contained in:
parent
c66ad14057
commit
d7c09f7e1e
1 changed files with 2 additions and 3 deletions
|
|
@ -566,9 +566,8 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
|
|||
StatementKind::FakeRead(FakeReadCause::ForMatchedPlace, _) => {
|
||||
self.check_op(ops::IfOrMatch);
|
||||
}
|
||||
StatementKind::SetDiscriminant { ref place, .. } => {
|
||||
let ctx = PlaceContext::MutatingUse(MutatingUseContext::Projection);
|
||||
self.visit_place(&place, ctx, location)
|
||||
StatementKind::SetDiscriminant { .. } => {
|
||||
self.super_statement(statement, location)
|
||||
}
|
||||
// FIXME(eddyb) should these really do nothing?
|
||||
StatementKind::FakeRead(..) |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue