Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnr

Improve use of ErrorGuaranteed and code cleanup

Part of #103874
This commit is contained in:
Matthias Krüger 2022-11-04 06:40:32 +01:00 committed by GitHub
commit 61c6cdb5f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 30 additions and 51 deletions

View file

@ -1979,7 +1979,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.