E0115
Enum without variants
ErrorAn enum needs at least one variant.
Why
A value of an enum is one of its variants, so an enum with none has no values at all, and nothing could use it. The variants are yours to name, so there is no fix.
Broken
enum Empty {}
fn main() {
print(1)
}
What sisu says
error[E0115]: `Empty` needs at least one variant --> E0115.sisu:1:6 | 1 | enum Empty {} | ^^^^^ sisu: 1 error sisu: for more on a code, run `sisu explain <code>`: E0115
Fixed
enum Signal {
Go
}
fn main() {
let s = Signal.Go
print(s == Signal.Go)
}
Sisu