Skip to content

Use macro-generated impls even for foreign types #2

@kpreid

Description

@kpreid

Make a macro that can be used to generate an implementation for another crate's type just like the derive macro does for a local one, and use it to implement Exhaust for types like Option, Result and Ordering.

This will ensure that our impls can have all the expected functionality and be tidily opaque rather than an aggregation of iterator combinators.

Open question: Should we rigorously use such implementations, or keep using iter::once, iter::empty, and such for simple cases?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions