lookup_error
This commit is contained in:
parent
f08b7d3c7a
commit
7dbfc49c54
@ -169,13 +169,19 @@ impl<'a, Ctx: CastCtx<'a>> TypelessMentionable<'a, Ctx> {
|
||||
}
|
||||
}
|
||||
|
||||
fn lookup_error<'a, Ctx: CastCtx<'a>>(
|
||||
error: ResolutionFailure<'a, Ctx, TypelessMentionable<'a, Ctx>>,
|
||||
) -> Ctx::LookupError {
|
||||
match error {
|
||||
ResolutionError::Lookup(lookup_error) => lookup_error,
|
||||
ResolutionError::Parse(parse_error) => Ctx::from_cast(CastError::Typeless(parse_error)),
|
||||
}
|
||||
}
|
||||
|
||||
fn cast_error<'a, Ctx: CastCtx<'a>, A: Mentionable<'a, Ctx>>(
|
||||
error: ResolutionFailure<'a, Ctx, TypelessMentionable<'a, Ctx>>,
|
||||
) -> ResolutionFailure<'a, Ctx, A> {
|
||||
ResolutionError::Lookup(match error {
|
||||
ResolutionError::Lookup(lookup_error) => lookup_error,
|
||||
ResolutionError::Parse(parse_error) => Ctx::from_cast(CastError::Typeless(parse_error)),
|
||||
})
|
||||
ResolutionError::Lookup(lookup_error::<Ctx>(error))
|
||||
}
|
||||
|
||||
fn cast_resolved<'a, Ctx: CastCtx<'a>, A: Mentionable<'a, Ctx>>(
|
||||
|
Loading…
Reference in New Issue
Block a user