Skip to content

Passing &Foo for newtype struct Foo #7672

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
luqmana opened this issue Jul 9, 2013 · 3 comments
Closed

Passing &Foo for newtype struct Foo #7672

luqmana opened this issue Jul 9, 2013 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@luqmana
Copy link
Member

luqmana commented Jul 9, 2013

It seems like this was broken as a result of the recent change to make newtypes structs immediate in certain cases.

struct TestNode(@int);

fn mm(_x: &TestNode) {}

fn main() {
    let x = &TestNode(@21);
    mm(x);
}
% rustc foo.rs
error: internal compiler error: drop_ty_immediate: non-box ty
@metajack
Copy link
Contributor

metajack commented Jul 9, 2013

This was found in Servo's rust-css tests.

nominating production ready

@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
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants