Skip to content

[Rust] Extract as much compile-time code as possible into functions, and call them via inlining #2653

@urlyy

Description

@urlyy

Feature Request

The se/de code for Rust struct and enum is expanded at compile time. Right now, all related methods are placed inside quote!{}, including some functions that don’t actually depend on compile-time variables. This makes IDE hints and debugging quite inconvenient. We should extract part of the code out and mark them with #[inline(always)] for inlining.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions