Starting with Rust 1.0, enum variants are limited to the enum type. You can use directly d:
pub use self::Foo::{A, B}; pub enum Foo { A, B, } fn main() { let a = A; }
or you can use a name indicating the type:
pub enum Foo { A, B, } fn main() { let a = Foo::A; }
Sergey Zalizko
source share