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

internal compiler error: const expr(33: Msg::Start) of type main::Msg has size 1 instead of 16 #26166

Closed
nnethercote opened this issue Jun 10, 2015 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nnethercote
Copy link
Contributor

This Rust code makes rustc stop with an internal compile error.

fn main() {
    enum Msg {
        Start,
        Measure(Fn() -> usize),
    }

    let _ = Msg::Start;
}
@mitaa
Copy link
Contributor

mitaa commented Jun 10, 2015

This seems to be the same issue as, or at least related to, #16812

Changing the example to

fn main() {
    enum Msg {
        Start(usize),
        Measure([u8]),
    }


    let _ = Msg::Start;
}

yields the same error message: Unexpected type returned from struct_tail

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jun 15, 2015
@arielb1
Copy link
Contributor

arielb1 commented Jun 18, 2015

cc #25388

@steveklabnik
Copy link
Member

This no longer ICEs!

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