Add support for ~const item bounds
This commit is contained in:
@@ -100,6 +100,15 @@ where
|
||||
})
|
||||
}
|
||||
|
||||
/// Assemble additional assumptions for an alias that are not included
|
||||
/// in the item bounds of the alias. For now, this is limited to the
|
||||
/// `implied_const_bounds` for an associated type.
|
||||
fn consider_additional_alias_assumptions(
|
||||
ecx: &mut EvalCtxt<'_, D>,
|
||||
goal: Goal<I, Self>,
|
||||
alias_ty: ty::AliasTy<I>,
|
||||
) -> Vec<Candidate<I>>;
|
||||
|
||||
fn consider_impl_candidate(
|
||||
ecx: &mut EvalCtxt<'_, D>,
|
||||
goal: Goal<I, Self>,
|
||||
@@ -594,6 +603,8 @@ where
|
||||
));
|
||||
}
|
||||
|
||||
candidates.extend(G::consider_additional_alias_assumptions(self, goal, alias_ty));
|
||||
|
||||
if kind != ty::Projection {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user