1
Fork 0

Continue reporting remaining errors instead of silently dropping them

This commit is contained in:
Oli Scherer 2024-02-13 14:56:20 +00:00
parent 09d73fab08
commit e9cda9b139
3 changed files with 41 additions and 2 deletions

View file

@ -740,8 +740,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
});
// We're done if we found errors, but we already emitted them.
if let Some(reported) = reported {
assert!(errors.is_empty());
if let Some(reported) = reported
&& errors.is_empty()
{
return reported;
}
assert!(!errors.is_empty());