Merge match branches

This commit is contained in:
Christian Poveda 2019-11-30 12:25:45 -05:00
parent d7c09f7e1e
commit 2ced9d96e7

View File

@ -560,15 +560,12 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
trace!("visit_statement: statement={:?} location={:?}", statement, location);
match statement.kind {
StatementKind::Assign(..) => {
StatementKind::Assign(..) | StatementKind::SetDiscriminant { .. } => {
self.super_statement(statement, location);
}
StatementKind::FakeRead(FakeReadCause::ForMatchedPlace, _) => {
self.check_op(ops::IfOrMatch);
}
StatementKind::SetDiscriminant { .. } => {
self.super_statement(statement, location)
}
// FIXME(eddyb) should these really do nothing?
StatementKind::FakeRead(..) |
StatementKind::StorageLive(_) |