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

rustc_macros cleanups #117731

Merged
merged 4 commits into from
Nov 14, 2023
Merged

rustc_macros cleanups #117731

merged 4 commits into from
Nov 14, 2023

Commits on Nov 9, 2023

  1. Simplify the current_rustc_version macro.

    It currently has the syntax
    `current_rustc_version!(env!("CFG_RELEASE"))` where the
    `env!("CFG_RELEASE")` part looks like a normal expression but it is
    actually parsed and processed by the `current_rustc_version` macro.
    
    The documented rationale for this is that you'll find it if you grep for
    `env!("CFG_RELEASE")`. But I think that's of very little use -- I would
    personally grep for just "CFG_RELEASE" -- and it complicates the macro,
    requiring the use of `syn`.
    
    This commit simplifies the macro.
    nnethercote committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    49908b4 View commit details
    Browse the repository at this point in the history
  2. Minor cleanups.

    - Reduce some function exposure.
    - Fix some comment formatting.
    nnethercote committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    b35e576 View commit details
    Browse the repository at this point in the history
  3. Update instructions in a comment.

    And avoid duplication.
    nnethercote committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    316ffba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dd6bab9 View commit details
    Browse the repository at this point in the history