change error_reported to use Result instead of an option

This commit is contained in:
yukang
2022-11-03 04:57:44 +08:00
parent 7df9d818ab
commit ab22f5521b
7 changed files with 15 additions and 22 deletions

View File

@@ -1977,7 +1977,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
}
err.emit()
} else if let Some(reported) = qself_ty.error_reported() {
} else if let Err(reported) = qself_ty.error_reported() {
reported
} else {
// Don't print `TyErr` to the user.