move Factory
auto-impl
This commit is contained in:
parent
02550c0ded
commit
68527dac32
@ -111,6 +111,13 @@ pub trait Factory<'a, Ctx: Context<'a>>:
|
||||
type _Mtbl: MentionableBase<'a, Fctr = Self> + MentionableTop<'a, Ctx>;
|
||||
}
|
||||
|
||||
impl<'a, Ctx: Context<'a>, F: FactoryParse<'a, Ctx> + ParseMode> Factory<'a, Ctx> for F
|
||||
where
|
||||
F::Mtbl: MentionableTop<'a, Ctx>,
|
||||
{
|
||||
type _Mtbl = Self::Mtbl;
|
||||
}
|
||||
|
||||
/// [`Mentionable`] associated with the [`Factory`]. Mostly useful for `type` definitions.
|
||||
pub type Mtbl<'a, F> = <F as FactoryBase<'a>>::Mtbl;
|
||||
|
||||
|
@ -10,13 +10,6 @@ impl<'a, Ctx: Context<'a>, F: FactoryModeParse<'a, Ctx>> FactoryParse<'a, Ctx> f
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Ctx: Context<'a>, F: FactoryParse<'a, Ctx> + ParseMode> Factory<'a, Ctx> for F
|
||||
where
|
||||
F::Mtbl: MentionableTop<'a, Ctx>,
|
||||
{
|
||||
type _Mtbl = Self::Mtbl;
|
||||
}
|
||||
|
||||
/// [`FactoryParse`] equivalent of [`ModeResult`].
|
||||
pub type ModeResultM<'a, F, I> = ModeResultP<F, Mtbl<'a, F>, ParseError<'a, F>, I>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user