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

Enum destructors don't get run while unwinding #26655

Closed
arielb1 opened this issue Jun 29, 2015 · 0 comments
Closed

Enum destructors don't get run while unwinding #26655

arielb1 opened this issue Jun 29, 2015 · 0 comments

Comments

@arielb1
Copy link
Contributor

arielb1 commented Jun 29, 2015

enum E { Foo }

impl Drop for E {
    fn drop(&mut self) {
        println!("Dropping");
    }
}

fn main() {
    let e = E::Foo;

    let o = 0;
    1/o;
}

Notice that Dropping won't get printed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant