Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[derive] Overhaul repr parsing #1752

Merged
merged 1 commit into from
Sep 30, 2024
Merged

[derive] Overhaul repr parsing #1752

merged 1 commit into from
Sep 30, 2024

Commits on Sep 26, 2024

  1. [derive] Overhaul repr parsing

    Represent the result of parsing all `#[repr(...)]` attributes on a type
    as a high-level type which is only capable of representing valid
    combinations of `#[repr(...)]` attributes and processes them into a
    concise representation that's easier for high-level code to work with.
    
    This prepares us to more easily fix #1748.
    
    While we're here, we make a number of other improvements.
    
    1) Errors are now converted to `TokenStream`s as late as possible rather
       than as early as possible, which was the previous behavior. This
       allows us to bail early when deriving an implied trait fails (e.g.,
       deriving `TryFromBytes` when the user wrote `#[derive(FromZeros)]`).
    2) Avoid re-computing some repr information in `TryFromBytes` enum
       support.
    joshlf committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    a5ebe1a View commit details
    Browse the repository at this point in the history