### STR ``` rust extern crate serialize; use serialize::json; use std::collections::HashMap; #[derive(Encodable, Eq, Hash, PartialEq)] enum Enum { Foo, Bar, } fn main() { let mut map = HashMap::new(); map.insert(0, 0); println!("{}", json::encode(&map)); let mut map = HashMap::new(); map.insert(Enum::Foo, 0); println!("{}", json::encode(&map)); println!("^ what?!"); } ``` ### Output ``` {"0":0} { ^ what?! ``` ### Version ``` rustc 1.0.0-nightly (29bd9a06e 2015-01-20 23:03:09 +0000) ``` The second hashmap was properly being serialized as `{"Foo":0}` with a two days old nightly (`rustc 1.0.0-nightly (dcaeb6aa2 2015-01-18 11:28:53 +0000)`). cc @aturon @alexcrichton @Gankro