Skip to content

Commit 063b26a

Browse files
committed
Explain some code duplication
1 parent adb2ac0 commit 063b26a

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_hir_analysis/src/hir_ty_lowering

1 file changed

+4
-0
lines changed

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
444444

445445
if let Err(incorrect) = self.incorrect_args {
446446
if incorrect.invalid_args.contains(&(param.index as usize)) {
447+
// FIXME: use `param.to_error` once `provided_kind` is supplied a list of
448+
// all previous generic args.
447449
return match param.kind {
448450
GenericParamDefKind::Lifetime => {
449451
ty::Region::new_error(tcx, incorrect.reported).into()
@@ -531,6 +533,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
531533

532534
if let Err(incorrect) = self.incorrect_args {
533535
if incorrect.invalid_args.contains(&(param.index as usize)) {
536+
// FIXME: use `param.to_error` once `inferred_kind` is supplied a list of
537+
// all previous generic args.
534538
return match param.kind {
535539
GenericParamDefKind::Lifetime => {
536540
ty::Region::new_error(tcx, incorrect.reported).into()

0 commit comments

Comments
 (0)