diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_ty/src/expr.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/expr.rs b/crates/ra_hir_ty/src/expr.rs index 7c3cd7952..f36304669 100644 --- a/crates/ra_hir_ty/src/expr.rs +++ b/crates/ra_hir_ty/src/expr.rs | |||
@@ -150,6 +150,13 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
150 | 150 | ||
151 | fn validate_call(&mut self, db: &dyn HirDatabase, call_id: ExprId, expr: &Expr) -> Option<()> { | 151 | fn validate_call(&mut self, db: &dyn HirDatabase, call_id: ExprId, expr: &Expr) -> Option<()> { |
152 | // Check that the number of arguments matches the number of parameters. | 152 | // Check that the number of arguments matches the number of parameters. |
153 | |||
154 | // Due to shortcomings in the current type system implementation, only emit this diagnostic | ||
155 | // if there are no type mismatches in the containing function. | ||
156 | if self.infer.type_mismatches.iter().next().is_some() { | ||
157 | return Some(()); | ||
158 | } | ||
159 | |||
153 | let (callee, args) = match expr { | 160 | let (callee, args) = match expr { |
154 | Expr::Call { callee, args } => { | 161 | Expr::Call { callee, args } => { |
155 | let callee = &self.infer.type_of_expr[*callee]; | 162 | let callee = &self.infer.type_of_expr[*callee]; |