diff options
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r-- | crates/hir_ty/src/lower.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 92f779360..8392cb770 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs | |||
@@ -565,7 +565,13 @@ fn substs_from_path_segment( | |||
565 | if generic_args.has_self_type { self_params + type_params } else { type_params }; | 565 | if generic_args.has_self_type { self_params + type_params } else { type_params }; |
566 | let skip = if generic_args.has_self_type && self_params == 0 { 1 } else { 0 }; | 566 | let skip = if generic_args.has_self_type && self_params == 0 { 1 } else { 0 }; |
567 | // if args are provided, it should be all of them, but we can't rely on that | 567 | // if args are provided, it should be all of them, but we can't rely on that |
568 | for arg in generic_args.args.iter().skip(skip).take(expected_num) { | 568 | for arg in generic_args |
569 | .args | ||
570 | .iter() | ||
571 | .filter(|arg| matches!(arg, GenericArg::Type(_))) | ||
572 | .skip(skip) | ||
573 | .take(expected_num) | ||
574 | { | ||
569 | match arg { | 575 | match arg { |
570 | GenericArg::Type(type_ref) => { | 576 | GenericArg::Type(type_ref) => { |
571 | had_explicit_type_args = true; | 577 | had_explicit_type_args = true; |