diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-10 10:31:06 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-11 09:03:26 +0000 |
| commit | af7f8f9811e71e9b7b1885c6e5567a0b2f7b3d6a (patch) | |
| tree | 9b5333f53f08aa028ce86af7103b5362abce365c /compiler/rustc_hir_analysis/src/astconv/mod.rs | |
| parent | 252ac152864528ef0a6f0a54458e1ecf07a7ddfc (diff) | |
| download | rust-af7f8f9811e71e9b7b1885c6e5567a0b2f7b3d6a.tar.gz rust-af7f8f9811e71e9b7b1885c6e5567a0b2f7b3d6a.zip | |
Silence follow up errors if astconv already errored
Diffstat (limited to 'compiler/rustc_hir_analysis/src/astconv/mod.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index 1f47564649e..cfe9496367f 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -390,6 +390,12 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { infer_args, ); + if let Err(err) = &arg_count.correct + && let Some(reported) = err.reported + { + self.set_tainted_by_errors(reported); + } + // Skip processing if type has no generic parameters. // Traits always have `Self` as a generic parameter, which means they will not return early // here and so associated type bindings will be handled regardless of whether there are any @@ -568,6 +574,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { span, modifier: constness.as_str(), }); + self.set_tainted_by_errors(e); arg_count.correct = Err(GenericArgCountMismatch { reported: Some(e), invalid_args: vec![] }); } |
