Closed
Description
http://is.gd/DOkUCJ Playground with backtrace
#[repr(C)]
pub enum CPOption<T> {
PSome(T),
}
fn main() {
println!("sizeof CPOption<i32> {}", std::mem::size_of::<CPOption<i32>>());
}
Versions affected: stable, beta, nightly.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
MagaTailor commentedon Apr 25, 2016
Here's a debug trace from
rustc 1.9.0-dev (470ca1c3f 2016-04-07)
luqmana commentedon Apr 28, 2016
This is not limited to generic enums. Just an oversight in typeck that we allow it to get to trans at all.
Auto merge of #33355 - luqmana:33202-repr-ice, r=nrc