Skip to content

destructuring enum-like structs that have destructors is still allowed #6386

Description

@ben0x539

#3147 "only" seems fixed for non-enum-like structs, the following code crashes right now.

struct S(~str);
impl Drop for S {
    fn finalize(&self) { println(**self); }
}

fn main() {
    match S(~"foo") {
        S(_s) => {}
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-destructorsArea: Destructors (`Drop`, …)A-type-systemArea: Type systemI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions