Skip to content

Use the enum_discriminant intrinsic when available in #[derive(PartialEq)] #26128

Closed
@pcwalton

Description

@pcwalton

It doesn't seem like we're using it as aggressively as we could. For example, if some variants are C-style, then we don't have to generate cases to handle those variants explicitly. This causes very large code bloat in Servo DOM code, for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensionsI-compiletimeIssue: Problems and improvements with respect to compile times.I-slowIssue: Problems and improvements with respect to performance of generated code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions