diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-03 13:28:49 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-03 13:28:49 +0000 |
| commit | 063b26af6bf7973768d2616eb4f79fc9b91ee11c (patch) | |
| tree | b99d343191f59852e50177c6454c3642fb46349b | |
| parent | adb2ac01657d8c0e972d641b6d22cc9b98ae217a (diff) | |
| download | rust-063b26af6bf7973768d2616eb4f79fc9b91ee11c.tar.gz rust-063b26af6bf7973768d2616eb4f79fc9b91ee11c.zip | |
Explain some code duplication
| -rw-r--r-- | compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index d26ebe9881b..4b8e12a489c 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -444,6 +444,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { if let Err(incorrect) = self.incorrect_args { if incorrect.invalid_args.contains(&(param.index as usize)) { + // FIXME: use `param.to_error` once `provided_kind` is supplied a list of + // all previous generic args. return match param.kind { GenericParamDefKind::Lifetime => { ty::Region::new_error(tcx, incorrect.reported).into() @@ -531,6 +533,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { if let Err(incorrect) = self.incorrect_args { if incorrect.invalid_args.contains(&(param.index as usize)) { + // FIXME: use `param.to_error` once `inferred_kind` is supplied a list of + // all previous generic args. return match param.kind { GenericParamDefKind::Lifetime => { ty::Region::new_error(tcx, incorrect.reported).into() |
