• S
    Switch to purely namespaced enums · 3dcd2157
    Steven Fackler 提交于
    This breaks code that referred to variant names in the same namespace as
    their enum. Reexport the variants in the old location or alter code to
    refer to the new locations:
    
    ```
    pub enum Foo {
        A,
        B
    }
    
    fn main() {
        let a = A;
    }
    ```
    =>
    ```
    pub use self::Foo::{A, B};
    
    pub enum Foo {
        A,
        B
    }
    
    fn main() {
        let a = A;
    }
    ```
    or
    ```
    pub enum Foo {
        A,
        B
    }
    
    fn main() {
        let a = Foo::A;
    }
    ```
    
    [breaking-change]
    3dcd2157
local_data.rs 23.6 KB