mozilla/rust — pull request #14002 by kemurphy (2014-05-07 00:11:31+00:00)
Title: Add Enumerable trait and deriving mode

Enumerable is for enumerating all possible values of an enum.
The deriving mode works for all C-like enums.

Use like so:

```rust
use std::enums::Enumerable;

#[deriving(Enumerable, Show)]
enum Shape {
Circle,
Square,
Triangle,
}

fn main() {
let shapes: Vec = Enumerable::values();
println!("There are {} possible Shapes: {}", shapes.len(), &shapes);
}
```