Remove wrong assertion.
This commit is contained in:
parent
409661936f
commit
84cb7ecbc1
2 changed files with 10 additions and 3 deletions
|
@ -334,9 +334,6 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
|
||||||
let refutable = !is_let_irrefutable(&mut ncx, local_lint_level, tpat);
|
let refutable = !is_let_irrefutable(&mut ncx, local_lint_level, tpat);
|
||||||
Some((expr.span, refutable))
|
Some((expr.span, refutable))
|
||||||
}
|
}
|
||||||
ExprKind::LogicalOp { op: LogicalOp::And, .. } => {
|
|
||||||
bug!()
|
|
||||||
}
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
10
tests/ui/match/guards-parenthesized-and.rs
Normal file
10
tests/ui/match/guards-parenthesized-and.rs
Normal file
|
@ -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!(),
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue