Sort Eq
candidates in the failure case too
This commit is contained in:
parent
5ef9ad37ab
commit
75d2e67ed2
3 changed files with 44 additions and 51 deletions
|
@ -650,12 +650,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME(#29623): return `Some(1)` when the values are different.
|
||||
(TestKind::Eq { value: test_val, .. }, TestCase::Constant { value: case_val })
|
||||
if test_val == case_val =>
|
||||
{
|
||||
fully_matched = true;
|
||||
Some(TestBranch::Success)
|
||||
(TestKind::Eq { value: test_val, .. }, TestCase::Constant { value: case_val }) => {
|
||||
if test_val == case_val {
|
||||
fully_matched = true;
|
||||
Some(TestBranch::Success)
|
||||
} else {
|
||||
fully_matched = false;
|
||||
Some(TestBranch::Failure)
|
||||
}
|
||||
}
|
||||
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue