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.
This commit is contained in:
Florian Diebold 2021-04-01 21:04:02 +02:00
parent 327f3a0a30
commit e480d81988
17 changed files with 323 additions and 161 deletions

View file

@ -392,7 +392,9 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
_ => return,
};
if params.len() > 0 && params[0] == mismatch.actual {
if params.len(&Interner) > 0
&& params.at(&Interner, 0).ty(&Interner) == Some(&mismatch.actual)
{
let (_, source_map) = db.body_with_source_map(self.owner);
if let Ok(source_ptr) = source_map.expr_syntax(id) {