diff --git a/src/rcore/origin.rs b/src/rcore/origin.rs index 6402c9e..faaa141 100644 --- a/src/rcore/origin.rs +++ b/src/rcore/origin.rs @@ -9,8 +9,7 @@ pub trait Origin<'a, Ctx: Context<'a>>: 'a { /// Try resolving the value. fn resolve(self: Rc) -> Resolution<'a, Ctx, Self::Mtbl> where - OFctr<'a, Ctx, Self>: Factory<'a, Ctx>, - Self::Mtbl: MentionableTop<'a, Ctx>; + OFctr<'a, Ctx, Self>: ParseFactory<'a, Ctx>; /// Try resolving the bytes. Should avoid parsing the value. fn resolve_bytes(self: Rc) -> HashResolution<'a, Ctx>; } diff --git a/src/rcore/resolver_origin.rs b/src/rcore/resolver_origin.rs index 91ca9ce..9a3f70a 100644 --- a/src/rcore/resolver_origin.rs +++ b/src/rcore/resolver_origin.rs @@ -1,6 +1,9 @@ use super::*; -impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> Point<'a, Ctx, A> { +impl<'a, Ctx: Context<'a>, A: MentionableBase<'a, Ctx>> Point<'a, Ctx, A> +where + A::Fctr: ParseFactory<'a, Ctx>, +{ /// Make a [Point] from an [Address]. pub fn from_address( address: Address, @@ -40,7 +43,9 @@ fn _resolve_origin<'a, Ctx: Context<'a>, F: ParseFactory<'a, Ctx>>( }) } -impl<'a, Ctx: Context<'a>, F: Factory<'a, Ctx>> Origin<'a, Ctx> for ResolverOrigin<'a, Ctx, F> { +impl<'a, Ctx: Context<'a>, F: ParseFactory<'a, Ctx>> Origin<'a, Ctx> + for ResolverOrigin<'a, Ctx, F> +{ type Mtbl = F::Mtbl; fn factory(&self) -> OFctr<'a, Ctx, Self> { @@ -49,7 +54,7 @@ impl<'a, Ctx: Context<'a>, F: Factory<'a, Ctx>> Origin<'a, Ctx> for ResolverOrig fn resolve(self: Rc) -> Resolution<'a, Ctx, Self::Mtbl> where - OFctr<'a, Ctx, Self>: Factory<'a, Ctx>, + OFctr<'a, Ctx, Self>: ParseFactory<'a, Ctx>, { _resolve_origin(self) }