-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
- rust version: 1.62.0
enum-iteratorversion: 1.1.2
The documentation states that Sequence can be derived for "enumerations without variants".
However, this does not work.
Minimal example
use enum_iterator::Sequence;
#[derive(Sequence)]
enum Empty {}Expected outcome
Sequence is successfully implemented for Empty.
Actual outcome
error[E0004]: non-exhaustive patterns: type `&Empty` is non-empty
--> src/lib.rs:3:10
|
3 | #[derive(Sequence)]
| ^^^^^^^^
|
note: `Empty` defined here
--> src/lib.rs:4:6
|
4 | enum Empty {}
| ^^^^^
= note: the matched value is of type `&Empty`
= note: references are always considered inhabited
= note: this error originates in the derive macro `Sequence` (in Nightly builds, run with -Z macro-backtrace for more info)
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
3 ~ #[derive(Sequence {
4 + _ => todo!(),
5 ~ })]
|
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working