Skip to content

RFC: enum discriminant ought to be smaller #1647

Closed
@nikomatsakis

Description

@nikomatsakis

We use int not i32. This is both wasteful and not compatible with C, where enums are always C integers (i32). We ought to fix this but #1645 makes it hard to do in general.

However, we could make this work in the special case of C-like enums, by changing trans::type_of_tag() to represent such tags as ints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions