Skip to content

Fix an ICE with unsized structs and optimised enums #18591

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

Merged
merged 2 commits into from
Nov 7, 2014

Conversation

nrc
Copy link
Member

@nrc nrc commented Nov 3, 2014

close #18353

r?

@bkoropoff
Copy link
Contributor

Travis was sad:

/home/travis/build/rust-lang/rust/src/librustc/middle/trans/adt.rs:314: line longer than 100 chars

@@ -291,7 +292,7 @@ struct Case {
#[deriving(Eq, PartialEq, Show)]
pub enum PointerField {
ThinPointer(uint),
FatPointer(uint, uint)
FatPointer(uint)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reasonable cleanup, but slightly confusing in that it uses slice_elt_base everywhere and silently depends on it being equal to trt_field_box. I would suggest merging the two constants into something like dst_fat_base or similar.

EDIT: I just noticed you added a comment about this which I hadn't read yet. I'll leave it up to you whether to bother fixing this now or later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I deliberately left it as a follow up, because I know we make the same assumption all over the place, so fixing isn't super-urgent.

@bkoropoff
Copy link
Contributor

Looks good to me

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 6, 2014
@bors bors merged commit 9af15e3 into rust-lang:master Nov 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE in translation phase while using DST: "Invalid operand types for ICmp instruction"
4 participants