ExternalPoints blanket impl

This commit is contained in:
AF 2023-07-29 10:44:50 +00:00
parent 886f6b2117
commit c2a69bd384
2 changed files with 11 additions and 15 deletions

View File

@ -49,21 +49,6 @@ impl<
{ {
} }
impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> ExternalPoints<'a, Ctx, Stack<'a, Ctx, Self>>
for A
where
<Fctr<'a, Ctx, A> as WithParseMode>::WithMode:
ExternalPointsProxy<'a, Ctx, Stack<'a, Ctx, A>, F = Fctr<'a, Ctx, A>>,
{
fn ex_points_typed(
mentionable: &Stack<'a, Ctx, Self>,
points: &mut impl PointsVisitor<'a, Ctx>,
) {
type Wm<'a, Ctx, A> = <Fctr<'a, Ctx, A> as WithParseMode>::WithMode;
<Wm<'a, Ctx, A> as ExternalPointsProxy<'a, Ctx, _>>::exp_points_typed(mentionable, points)
}
}
impl<'a, Ctx: Context<'a>, F: RegularFactory<'a, Ctx>> impl<'a, Ctx: Context<'a>, F: RegularFactory<'a, Ctx>>
ExternalPointsProxy<'a, Ctx, Stack<'a, Ctx, Mtbl<'a, Ctx, F>>> for WithMode<F, RegularMode> ExternalPointsProxy<'a, Ctx, Stack<'a, Ctx, Mtbl<'a, Ctx, F>>> for WithMode<F, RegularMode>
where where

View File

@ -10,3 +10,14 @@ where
{ {
fn exp_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>); fn exp_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>);
} }
impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>, T> ExternalPoints<'a, Ctx, T> for A
where
<Fctr<'a, Ctx, A> as WithParseMode>::WithMode:
ExternalPointsProxy<'a, Ctx, T, F = Fctr<'a, Ctx, A>>,
{
fn ex_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>) {
type Wm<'a, Ctx, A> = <Fctr<'a, Ctx, A> as WithParseMode>::WithMode;
<Wm<'a, Ctx, A> as ExternalPointsProxy<'a, Ctx, _>>::exp_points_typed(mentionable, points)
}
}