From c8401a504646eefdd46de66732d8da58adca9a25 Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut Date: Sat, 29 Feb 2020 14:19:48 +0100 Subject: [PATCH] Do not ICE on invalid type node --- src/librustc_typeck/check/expr.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc_typeck/check/expr.rs b/src/librustc_typeck/check/expr.rs index 38d73256469..14615521749 100644 --- a/src/librustc_typeck/check/expr.rs +++ b/src/librustc_typeck/check/expr.rs @@ -1312,6 +1312,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ty_span: Span, ) { if variant.recovered { + self.set_tainted_by_errors(); return; } let mut err = self.type_error_struct_with_diag(