Skip to content

Putting a destructor on a newtype struct ICE's if that newtype is an immediate #8017

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

Closed
pcwalton opened this issue Jul 24, 2013 · 4 comments
Closed
Labels
A-codegen Area: Code generation E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@pcwalton
Copy link
Contributor

Regression from the change to make newtype structs immediates.

@pcwalton
Copy link
Contributor Author

Nominating for production ready

@huonw
Copy link
Member

huonw commented Jul 24, 2013

Do you have an example? The following compiles with the current stage0 (which is from a few days ago, so definitely has the newtypes-can-be-immediate patch):

struct Foo(uint);

impl Drop for Foo {
    fn drop(&self) {}
}

fn main() {
    let _a = Foo(1);
}

@catamorphism
Copy link
Contributor

Accepted for production-ready

@thestinger
Copy link
Contributor

Closing as a duplicate of #9446. I have a fix in the pipeline for this (#9643).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants