diff --git a/src/rcore/origin.rs b/src/rcore/origin.rs index 4dd8a1f..7d343cc 100644 --- a/src/rcore/origin.rs +++ b/src/rcore/origin.rs @@ -3,7 +3,7 @@ use super::*; /// Represents a potentially resolvable [`Mentionable`]. pub trait Origin<'a, Ctx: Context<'a>>: 'a { /// Type of the associated object. - type Mtbl: Mentionable<'a, Ctx>; + type Mtbl: MentionableBase<'a, Ctx>; /// Clone the associated factory. fn factory(&self) -> OFctr<'a, Ctx, Self>; /// Try resolving the value. diff --git a/src/rstd/wrapped_origin.rs b/src/rstd/wrapped_origin.rs index 8eb5fdf..5f7ac83 100644 --- a/src/rstd/wrapped_origin.rs +++ b/src/rstd/wrapped_origin.rs @@ -24,7 +24,10 @@ pub trait MappableOrigin<'a, Ctx: Context<'a>>: Origin<'a, Ctx> { + Clone + Fn(ParseError<'a, Ctx, OFctr<'a, Ctx, Self>>) -> ParseError<'a, Ctx, B::Fctr>, map_factory: impl 'a + FnOnce(OFctr<'a, Ctx, Self>) -> B::Fctr, - ) -> Rc> { + ) -> Rc> + where + OFctr<'a, Ctx, Self>: Factory<'a, Ctx>, + { let origin_r = self.clone(); let origin_rb = self.clone(); let origin: WrappedOrigin<'a, Ctx, B> = WrappedOrigin {