Use namespaced enums

rust-lang/rust#18973 changed the behavior of enums. Enums are now namespaced.