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

Support for format args capture #180

Merged
merged 5 commits into from
Nov 3, 2021
Merged

Support for format args capture #180

merged 5 commits into from
Nov 3, 2021

Commits on Nov 3, 2021

  1. Configuration menu
    Copy the full SHA
    93fae17 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9da23ae View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f8d849b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    941d3d6 View commit details
    Browse the repository at this point in the history
  5. Remove workaround for nonstring literals

    Stringifying a non-string $:literal for passing into the format_args
    call is incompatible with format args capture: "to avoid ambiguity,
    `format_args!` cannot capture variables when the format string is
    expanded from a macro".
    
        error: there is no argument named `var`"
         --> src/main.rs:3:26
          |
        3 |     let _ = format_args!(concat!("{var}"));
          |                          ^^^^^^^^^^^^^^^^
          |
          = note: did you intend to capture a variable `var` from the surrounding scope?
          = note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
    dtolnay committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    6ae9937 View commit details
    Browse the repository at this point in the history