Closed
Description
This is another manifestation of #6352.
pub enum X { P, Q(u64) }
pub struct Y { b: X, c: u32 }
pub static Z: Y = Y { b: P, c: 24 };
fn main() {}
...results in the ICE:
{ { i8, [15 x i8] }, i32 } { { i8, [15 x i8] } { i8 0, [15 x i8] undef }, i32 24 }
{ { i8, [7 x i8], [1 x i64] }, i32 } undef
error: internal compiler error: const expr(25: Y{b: P, c: 24,}) of type Y has size 20 instead of 24
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
Tested with the recent nightly both in Ubuntu (x86_64-unknown-linux-gnu, 201401280405, 8c6c229) and Windows (i686-pc-mingw32, 0.10.20140123, couldn't locate the exact commit).
Metadata
Metadata
Assignees
Labels
No labels