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

Implement Inline Size Assertion Annotations #1405

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Jun 9, 2024

  1. Implement Inline Size Assertion Annotations

    Implem the procedural macro `inline_assert_size_eq` to check the size of
    a type at compile time. Additionally, add the test file
    `inline_assert_size_eq_failed.rs` to ensure that the macro tirggers a
    compile-time error when the size is not as expected
    Fixes google#1329
    zoo868e committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    aa9d014 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Refactor Macro Naming and Remove Dependency

    To avoid confusion with the existing `const_assert` macro. I named the
    macro to assert the falsehood of an expression at compile time
    `static_const_assert`
    Rename `inline_assert_size_eq` to `assert_size_eq_val`
    zoo868e committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    72b0c2e View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

  1. Utilize proc_macro2 and match

    zoo868e committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    a425c2f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96c9d52 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. Configuration menu
    Copy the full SHA
    905143c View commit details
    Browse the repository at this point in the history