parse impl types (abstract types) where the lifetime comes first #258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes: #234. i have two notes for this:
one: i had to use a
prec(1,
to resolve conflicts with_type
. i could have also just used a_type
instead of theprec(1, choice(
, but that would have allowed syntax likeimpl *const u8
andimpl impl dyn Trait
, which i don't think should be possible.the conflict
two: as a drive-by-fix in 36e527b, i simplified the
bounded_type
rule, and also made it more correct. previously it would not allowimpl use<'a> + 'a + Trait
, which it should syntactically according to the reference. i fixed this here, because (at least in my testing) it doesn't actually change anything and i thought it would be a little silly as an extra pr, but i can split it out if you want me to.as usual, the diff for the rustc test suite (#229):
the diff