You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code (playground) ICEs with error: internal compiler error: /checkout/src/librustc/ty/layout.rs:603: Struct cannot be packed and aligned:
It's probably correct that this is an error, but it should not be an ICE. Also, the ICE only appears when the struct is actually instantiated, only defining it is not sufficient, but should also result in an error.
Activity
bitshifter commentedon Jul 22, 2017
Interesting, if you change the repr to a one liner (playground) you get a compile error as expected (tested https://github.com/rust-lang/rust/blob/master/src/test/compile-fail/conflicting-repr-hints.rs#L30). I didn't realise that the behaviour would be different if the repr statements were split. I'll take a look.
bitshifter commentedon Jul 22, 2017
The other compile fail tests in that file don't work if the representation hints are split also. I assume that's not a good thing.
Better detection of repr packed and align
Auto merge of #43443 - bitshifter:issue-43317, r=nikomatsakis