1
Fork 0

Only check locally for reported errors

This commit is contained in:
Oli Scherer 2024-06-17 08:15:43 +00:00
parent af3d1004c7
commit a183989e88
5 changed files with 41 additions and 6 deletions

View file

@ -793,7 +793,7 @@ impl<'cx, 'tcx> Resolver<'cx, 'tcx> {
}
fn report_error(&self, p: impl Into<ty::GenericArg<'tcx>>) -> ErrorGuaranteed {
if let Some(guar) = self.fcx.dcx().has_errors() {
if let Some(guar) = self.fcx.tainted_by_errors() {
guar
} else {
self.fcx