Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to purely namespaced enums #18973

Merged
merged 1 commit into from
Nov 17, 2014
Merged

Commits on Nov 17, 2014

  1. Switch to purely namespaced enums

    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]
    sfackler committed Nov 17, 2014
    9 Configuration menu
    Copy the full SHA
    3dcd215 View commit details
    Browse the repository at this point in the history