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

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

Closed
ben0x539 opened this issue May 10, 2013 · 1 comment
Closed
Labels
A-destructors Area: destructors (Drop, ..) A-typesystem Area: The type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@ben0x539
Copy link
Contributor

#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) => {}
    }
}
@nikomatsakis
Copy link
Contributor

Fixed in my branch for #3235

@bors bors closed this as completed in a48ca32 Jul 9, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 6, 2020
Remove mention of possibility to specify the MSRV with a tilde/caret

As `@taiki-e` explained in rust-lang/rust-clippy#6379 (comment), mentioning this might be problematic.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-destructors Area: destructors (Drop, ..) A-typesystem Area: The type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants