1
Fork 0

Rollup merge of #102720 - lyming2007:issue-102397-fix, r=compiler-errors

do not reverse the expected type and found type for ObligationCauseCo…

…de of IfExpressionWithNoElse

this will fix #102397
This commit is contained in:
Matthias Krüger 2022-10-07 07:28:10 +02:00 committed by GitHub
commit 047ff20875
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}