Update for namespaced enums.

As per https://github.com/rust-lang/rust/pull/18973