Skip to content

ICE with C generic enum #33202

Closed
Closed
@pravic

Description

@pravic

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

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions