diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-04 10:27:00 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-11 11:00:15 +0000 |
| commit | dce98c52ff3e431d9b1358298fe8da9db545a3e2 (patch) | |
| tree | b4651ae12ed3a44a711f5257cdc11a37a6f65aea /compiler | |
| parent | 8c39ac9eccdfaeff11bd3b6107817a81fe0a3a43 (diff) | |
Avoid follow-up errors and ICEs after missing lifetime errors on data structures
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_infer/src/infer/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 9f55939c165..a0be545d46f 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1264,6 +1264,9 @@ impl<'tcx> InferCtxt<'tcx> { where T: TypeFoldable<TyCtxt<'tcx>>, { + if let Err(guar) = value.error_reported() { + self.set_tainted_by_errors(guar); + } if !value.has_non_region_infer() { return value; } |
