Closed durka closed 8 years ago
Nice.
Aside #1
: Unified as in have their implementations shares as much as possible? I agree. I've been mulling general-purpose parse_*!
macros for a while, but I don't want to do that until I have a way to parse generics.
Aside #2
: yeah, should probably do an audit and absolutise all the names.
Parsing generics on stable without a procedural macro is a non-starter if you want to separate out the lifetimes, unless we get a back-out-able way to parse a lifetime, such as changing the parser somehow to allow ' $life:ident
. If you want to parse the lifetimes and generic parameters lumped together (less useful, obviously) that should be doable.
Uses an accumulator in the macro iteration to count the variants and provide accurate (I hope...) implementations of
size_hint
.Aside #1
: the macros forIterVariants
andIterVariantNames
really ought to be unified.Aside #2
: Mostly the macros take great care to use absolute paths, but there are some bareNone
s in the final expansions.cc @bluss