diff --git a/src/rcore.rs b/src/rcore.rs index df6a865..c57de01 100644 --- a/src/rcore.rs +++ b/src/rcore.rs @@ -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> = >::Mtbl; diff --git a/src/rcore/modes.rs b/src/rcore/modes.rs index 594b3ad..684e4db 100644 --- a/src/rcore/modes.rs +++ b/src/rcore/modes.rs @@ -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, ParseError<'a, F>, I>;