Skip to content

Commit 3cf7d22

Browse files
committed
Use has_errors_excluding_lint_errors instead of tainted_by_errors on report_error
When constant evaluation fails, the error is propagated to other places if report_error uses tainted_by_errors. Signed-off-by: Shunpoco <[email protected]>
1 parent 75530e9 commit 3cf7d22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_hir_typeck/src/writeback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ impl<'cx, 'tcx> Resolver<'cx, 'tcx> {
779779
}
780780

781781
fn report_error(&self, p: impl Into<ty::GenericArg<'tcx>>) -> ErrorGuaranteed {
782-
if let Some(guar) = self.fcx.tainted_by_errors() {
782+
if let Some(guar) = self.fcx.dcx().has_errors_excluding_lint_errors() {
783783
guar
784784
} else {
785785
self.fcx

0 commit comments

Comments
 (0)