loosen Origin
bounds
This commit is contained in:
parent
c0e7e54e34
commit
7ebc5ba615
@ -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.
|
||||
|
@ -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<dyn Origin<'a, Ctx, Mtbl = B>> {
|
||||
) -> Rc<dyn Origin<'a, Ctx, Mtbl = B>>
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user