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

Replace proc-macro-error with proc-macro2-diagnostics #536

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

Commits on Jan 7, 2024

  1. Update UI tests

    ```
    TRYBUILD=overwrite cargo test
    ```
    tamird committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    c277d82 View commit details
    Browse the repository at this point in the history
  2. derive: appease rustc

    ```
    warning: unnecessary parentheses around match arm expression
       --> structopt-derive/src/parse.rs:177:28
        |
    177 |                 "about" => (Ok(About(name, None))),
        |                            ^                     ^
        |
        = note: `#[warn(unused_parens)]` on by default
    help: remove these parentheses
        |
    177 -                 "about" => (Ok(About(name, None))),
    177 +                 "about" => Ok(About(name, None)),
        |
    
    warning: unnecessary parentheses around match arm expression
       --> structopt-derive/src/parse.rs:178:29
        |
    178 |                 "author" => (Ok(Author(name, None))),
        |                             ^                      ^
        |
    help: remove these parentheses
        |
    178 -                 "author" => (Ok(Author(name, None))),
    178 +                 "author" => Ok(Author(name, None)),
        |
    ```
    tamird committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    4858406 View commit details
    Browse the repository at this point in the history
  3. Remove needless lifetimes

    ```
    warning: the following explicit lifetimes could be elided: 'a
        --> src/lib.rs:1205:24
         |
    1205 |     fn from_subcommand<'a, 'b>(_sub: (&'b str, Option<&'b clap::ArgMatches<'a>>)) -> Option<Self>
         |                        ^^                                                  ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
         = note: `#[warn(clippy::needless_lifetimes)]` on by default
    help: elide the lifetimes
         |
    1205 -     fn from_subcommand<'a, 'b>(_sub: (&'b str, Option<&'b clap::ArgMatches<'a>>)) -> Option<Self>
    1205 +     fn from_subcommand<'b>(_sub: (&'b str, Option<&'b clap::ArgMatches<'_>>)) -> Option<Self>
         |
    
    warning: the following explicit lifetimes could be elided: 'a
        --> src/lib.rs:1230:24
         |
    1230 |     fn from_subcommand<'a, 'b>(sub: (&'b str, Option<&'b clap::ArgMatches<'a>>)) -> Option<Self> {
         |                        ^^                                                 ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1230 -     fn from_subcommand<'a, 'b>(sub: (&'b str, Option<&'b clap::ArgMatches<'a>>)) -> Option<Self> {
    1230 +     fn from_subcommand<'b>(sub: (&'b str, Option<&'b clap::ArgMatches<'_>>)) -> Option<Self> {
         |
    ```
    tamird committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    313d079 View commit details
    Browse the repository at this point in the history
  4. derive: use syn@2

    tamird committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    9cda94e View commit details
    Browse the repository at this point in the history
  5. Replace proc-macro-error with proc-macro2-diagnostics

    proc-macro-error is unmaintained, and structopt-derive is by far its
    most popular dependent. See
    https://crates.io/crates/proc-macro-error/reverse_dependencies.
    tamird committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    4f15dea View commit details
    Browse the repository at this point in the history