Skip to content

Commit d7c09f7

Browse files
committed
Change way of checking SetDiscriminant
1 parent c66ad14 commit d7c09f7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_mir/transform/check_consts/validation.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,8 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
566566
StatementKind::FakeRead(FakeReadCause::ForMatchedPlace, _) => {
567567
self.check_op(ops::IfOrMatch);
568568
}
569-
StatementKind::SetDiscriminant { ref place, .. } => {
570-
let ctx = PlaceContext::MutatingUse(MutatingUseContext::Projection);
571-
self.visit_place(&place, ctx, location)
569+
StatementKind::SetDiscriminant { .. } => {
570+
self.super_statement(statement, location)
572571
}
573572
// FIXME(eddyb) should these really do nothing?
574573
StatementKind::FakeRead(..) |

0 commit comments

Comments
 (0)