Unable to deduce associated type equality #47897
Labels
A-associated-items
Area: Associated items (types, constants & functions)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I'm working with combine and rust nightly to make some parsers and I'm wondering why both of these examples are not equivalent:
The first example compiles successfully:
whereas this one
produces this error:
AFAICT, the bounds:
I::Error: ParseError<u8, &'a [u8], I::Position>
andI::Error: ParseError<I::Item, I::Range, I::Position>
should be identical since we knowI::Item = u8
andI::Range = &'a [u8]
.Is this a limitation of the compiler's inference, a bug, or something else?
The text was updated successfully, but these errors were encountered: