diff options
author | Florian Diebold <[email protected]> | 2021-04-01 20:04:02 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-03 10:17:13 +0100 |
commit | e480d81988fc0c0e4f80f1c54058b95b9aaf1ebf (patch) | |
tree | 079dabc4e0de72e30d2bd04bd50427ff6950b348 /crates/hir_ty/src/diagnostics/expr.rs | |
parent | 327f3a0a3017e047be58b8312f8bf3ac690db3fd (diff) |
Introduce `GenericArg` like in Chalk
Plus some more adaptations to Substitution.
Lots of `assert_ty_ref` that we should revisit when introducing
lifetime/const parameters.
Diffstat (limited to 'crates/hir_ty/src/diagnostics/expr.rs')
-rw-r--r-- | crates/hir_ty/src/diagnostics/expr.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_ty/src/diagnostics/expr.rs b/crates/hir_ty/src/diagnostics/expr.rs index 3909ad354..373d1cb74 100644 --- a/crates/hir_ty/src/diagnostics/expr.rs +++ b/crates/hir_ty/src/diagnostics/expr.rs | |||
@@ -392,7 +392,9 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
392 | _ => return, | 392 | _ => return, |
393 | }; | 393 | }; |
394 | 394 | ||
395 | if params.len() > 0 && params[0] == mismatch.actual { | 395 | if params.len(&Interner) > 0 |
396 | && params.at(&Interner, 0).ty(&Interner) == Some(&mismatch.actual) | ||
397 | { | ||
396 | let (_, source_map) = db.body_with_source_map(self.owner); | 398 | let (_, source_map) = db.body_with_source_map(self.owner); |
397 | 399 | ||
398 | if let Ok(source_ptr) = source_map.expr_syntax(id) { | 400 | if let Ok(source_ptr) = source_map.expr_syntax(id) { |