diff options
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index ca005bc99..2cdce2cef 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -856,7 +856,12 @@ impl<'a> InferenceContext<'a> { | |||
856 | // handle provided type arguments | 856 | // handle provided type arguments |
857 | if let Some(generic_args) = generic_args { | 857 | if let Some(generic_args) = generic_args { |
858 | // if args are provided, it should be all of them, but we can't rely on that | 858 | // if args are provided, it should be all of them, but we can't rely on that |
859 | for arg in generic_args.args.iter().take(type_params) { | 859 | for arg in generic_args |
860 | .args | ||
861 | .iter() | ||
862 | .filter(|arg| matches!(arg, GenericArg::Type(_))) | ||
863 | .take(type_params) | ||
864 | { | ||
860 | match arg { | 865 | match arg { |
861 | GenericArg::Type(type_ref) => { | 866 | GenericArg::Type(type_ref) => { |
862 | let ty = self.make_ty(type_ref); | 867 | let ty = self.make_ty(type_ref); |