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

Proc macro tweaks #97004

Merged
merged 12 commits into from
May 27, 2022
Merged

Proc macro tweaks #97004

merged 12 commits into from
May 27, 2022

Commits on May 27, 2022

  1. Fix a typo in a comment.

    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    2469ed0 View commit details
    Browse the repository at this point in the history
  2. Add some comments.

    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    a61a85e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e02789c View commit details
    Browse the repository at this point in the history
  4. Make Buffer<T> non-generic.

    `u8` is the only type that makes sense for `T`, as demonstrated by the
    fact that several impls and functions are hardwired to `Buffer<u8>`.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    2ece157 View commit details
    Browse the repository at this point in the history
  5. Simplify types in proc_macro_harness.rs.

    This gives the more obvious derive/attr/bang distinction, and reduces
    code size slightly.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    1a9514d View commit details
    Browse the repository at this point in the history
  6. Rename ProcMacro trait as BangProcMacro.

    Similar to the existing `AttrProcMacro` trait.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    dbdc7dd View commit details
    Browse the repository at this point in the history
  7. Rename ProcMacroDerive as DeriveProcMacro.

    So it matches the existing `AttrProcMacro` and `BangProcMacro` types.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    bc70d0d View commit details
    Browse the repository at this point in the history
  8. Clarify a comment.

    `reverse_encode` isn't necessary to please the borrow checker, it's to
    match the ordering done by `reverse_decode`.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    9a785e0 View commit details
    Browse the repository at this point in the history
  9. Add some comments about _marker fields.

    There is some non-obvious information required to understand them.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    c2c5057 View commit details
    Browse the repository at this point in the history
  10. Rename b as buf in several places.

    Because it's easy to confuse with `bridge`.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    f5c9c12 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e6fa19a View commit details
    Browse the repository at this point in the history
  12. Cut down associated_item.

    The part of it dealing with types obfuscates and makes the code less
    concise. This commit removes that part.
    nnethercote committed May 27, 2022
    Configuration menu
    Copy the full SHA
    41c10dd View commit details
    Browse the repository at this point in the history