Closed
Description
Consider the following example:
enum Foo {
A,
B,
C
}
fn main() {
println!("{}", Foo::A as usize);
println!("{}", Foo::B as usize);
println!("{}", Foo::C as usize);
}
The current behavior is that Foo members get casted to an increasing sequence starting from 0. Although that seems to be the most reasonable default, it should be documented to make clear that it won't be changed in the future.