48496fc1b6
newtype'd enums have 1 variant, and 1 field. denegerate have only 1 variant but may have more fields.
8 lines
106 B
Rust
8 lines
106 B
Rust
enum Foo = uint;
|
|
|
|
fn main() {
|
|
let x = Foo(1);
|
|
let y = fmt!("%?", x);
|
|
assert y == ~"Foo(1)";
|
|
}
|