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

@ -138,7 +138,7 @@ pub(crate) fn trait_solve_query(
..
})) = &goal.value.goal
{
if let TyKind::BoundVar(_) = &projection_ty.substitution[0].interned(&Interner) {
if let TyKind::BoundVar(_) = projection_ty.self_type_parameter().interned(&Interner) {
// Hack: don't ask Chalk to normalize with an unknown self type, it'll say that's impossible
return Some(Solution::Ambig(Guidance::Unknown));
}