Skip to content

Commit

Permalink
Remove wrong assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Apr 30, 2023
1 parent 4096619 commit 84cb7ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 0 additions & 3 deletions compiler/rustc_mir_build/src/thir/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
let refutable = !is_let_irrefutable(&mut ncx, local_lint_level, tpat);
Some((expr.span, refutable))
}
ExprKind::LogicalOp { op: LogicalOp::And, .. } => {
bug!()
}
_ => None,
}
};
Expand Down
10 changes: 10 additions & 0 deletions tests/ui/match/guards-parenthesized-and.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// check-pass

fn main() {
let c = 1;
let w = "T";
match Some(5) {
None if c == 1 && (w != "Y" && w != "E") => {}
_ => panic!(),
}
}

0 comments on commit 84cb7ec

Please sign in to comment.