do not reverse the expected type and found type for ObligationCauseCode of IfExpressionWithNoElse

this will fix #102397
This commit is contained in:
Yiming Lei 2022-10-05 14:00:51 -07:00
parent 8c71b67159
commit 0501d615bb
9 changed files with 9 additions and 9 deletions

View file

@ -259,7 +259,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
err.help("consider adding an `else` block that evaluates to the expected type");
error = true;
},
ret_reason.is_none(),
false,
);
error
}