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

#[error(transparent)] triggers clippy::used_underscore_binding lint #88

Closed
U007D opened this issue May 22, 2020 · 2 comments · Fixed by #89
Closed

#[error(transparent)] triggers clippy::used_underscore_binding lint #88

U007D opened this issue May 22, 2020 · 2 comments · Fixed by #89

Comments

@U007D
Copy link
Sponsor

U007D commented May 22, 2020

#[derive(Debug, Error, PartialEq)]
pub enum Error {
    // ...
    #[error(transparent)]
    VersionError(#[from] SomeOtherVersionError),
}

yields

error: used binding `_0` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
 --> src/error.rs:9:13
  |
9 |     #[error(transparent)]
  |             ^^^^^^^^^^^
  |
note: the lint level is defined here
 --> src/main.rs:7:5
  |
7 |     clippy::pedantic,
  |     ^^^^^^^^^^^^^^^^
  = note: `#[deny(clippy::used_underscore_binding)]` implied by `#[deny(clippy::pedantic)]`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
@U007D
Copy link
Sponsor Author

U007D commented May 22, 2020

<3

@U007D U007D closed this as completed May 22, 2020
@dtolnay
Copy link
Owner

dtolnay commented May 22, 2020

Fixed in 1.0.19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants