diff options
| author | Philipp Krones <hello@philkrones.com> | 2022-11-21 20:52:12 +0100 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2022-11-21 20:52:12 +0100 |
| commit | 28fb084ec70844a03f83dbd7a776ca0917b890be (patch) | |
| tree | dac2ef98f920a03a5df87b4b1a01295f9ace69a9 | |
| parent | 46c5a5d234f13dcf4bb4cf4241b2addedbf0be14 (diff) | |
| download | rust-28fb084ec70844a03f83dbd7a776ca0917b890be.tar.gz rust-28fb084ec70844a03f83dbd7a776ca0917b890be.zip | |
Fix declare_clippy_lint crate
| -rw-r--r-- | declare_clippy_lint/Cargo.toml | 3 | ||||
| -rw-r--r-- | declare_clippy_lint/src/lib.rs | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/declare_clippy_lint/Cargo.toml b/declare_clippy_lint/Cargo.toml index 578109840fb..082570f1fe5 100644 --- a/declare_clippy_lint/Cargo.toml +++ b/declare_clippy_lint/Cargo.toml @@ -11,3 +11,6 @@ proc-macro = true itertools = "0.10.1" quote = "1.0.21" syn = "1.0.100" + +[features] +deny-warnings = [] diff --git a/declare_clippy_lint/src/lib.rs b/declare_clippy_lint/src/lib.rs index 962766916dd..26210556d65 100644 --- a/declare_clippy_lint/src/lib.rs +++ b/declare_clippy_lint/src/lib.rs @@ -1,5 +1,7 @@ #![feature(let_chains)] #![cfg_attr(feature = "deny-warnings", deny(warnings))] +// warn on lints, that are included in `rust-lang/rust`s bootstrap +#![warn(rust_2018_idioms, unused_lifetimes)] use proc_macro::TokenStream; use quote::{format_ident, quote}; @@ -29,7 +31,7 @@ struct ClippyLint { } impl Parse for ClippyLint { - fn parse(input: ParseStream) -> Result<Self> { + fn parse(input: ParseStream<'_>) -> Result<Self> { let attrs = input.call(Attribute::parse_outer)?; let mut in_code = false; |
