Skip to content

Fix various ICEs relating to trans'ing fields with associated types #20706

Merged
bors merged 7 commits into
rust-lang:masterfrom
nikomatsakis:assoc-types-projections-in-structs-issue-20470
Jan 8, 2015
Merged

Fix various ICEs relating to trans'ing fields with associated types #20706
bors merged 7 commits into
rust-lang:masterfrom
nikomatsakis:assoc-types-projections-in-structs-issue-20470

Conversation

@nikomatsakis

Copy link
Copy Markdown
Contributor

There were various parts of trans that were failing to normalize associated types of fields. In addition, the use of TypeContents to compute whether something is sized was not able to handle projection types.

Fixes #20470.
Fixes #20368.
Fixes #20535.

r? @nick29581

always were but it's dang annoying to weed out all the places that
fail to meet the assertion, and it doesn't really hurt things if we don't
always get it right.
@sfackler

sfackler commented Jan 7, 2015

Copy link
Copy Markdown
Member

Does this close #20368 as well?

@nikomatsakis

Copy link
Copy Markdown
Contributor Author

@sfackler yes, I just tried it. Test seems too similar to merit being added as a regression test though.

@nikomatsakis nikomatsakis force-pushed the assoc-types-projections-in-structs-issue-20470 branch from d6204e1 to e16449e Compare January 7, 2015 23:46
@nikomatsakis

Copy link
Copy Markdown
Contributor Author

Just pushed one additional commit. This also fixes #20535 now.

Comment thread src/librustc_trans/trans/common.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changing this fn and lltype_is_sized to take a CrateCtxt rather than a ty::ctxt seems unnecessary and makes things more complicated.

@nrc

nrc commented Jan 8, 2015

Copy link
Copy Markdown
Member

r = me with the tcx -> ccx changes reverted

@nikomatsakis nikomatsakis force-pushed the assoc-types-projections-in-structs-issue-20470 branch from e16449e to cb98c3d Compare January 8, 2015 01:33
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015
…-in-structs-issue-20470

Conflicts:
	src/librustc_trans/trans/expr.rs
@bors bors merged commit cb98c3d into rust-lang:master Jan 8, 2015
@nikomatsakis nikomatsakis deleted the assoc-types-projections-in-structs-issue-20470 branch March 30, 2016 16:12
lnicola pushed a commit to lnicola/rust that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants