Fix declare_clippy_lint crate

This commit is contained in:
Philipp Krones 2022-11-21 20:52:12 +01:00
parent d407778c75
commit b4c90abb5f
No known key found for this signature in database
GPG Key ID: 1CA0DF2AF59D68A5
2 changed files with 6 additions and 1 deletions

View File

@ -11,3 +11,6 @@ proc-macro = true
itertools = "0.10.1" itertools = "0.10.1"
quote = "1.0.21" quote = "1.0.21"
syn = "1.0.100" syn = "1.0.100"
[features]
deny-warnings = []

View File

@ -1,5 +1,7 @@
#![feature(let_chains)] #![feature(let_chains)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))] #![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 proc_macro::TokenStream;
use quote::{format_ident, quote}; use quote::{format_ident, quote};
@ -29,7 +31,7 @@ struct ClippyLint {
} }
impl Parse for 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 attrs = input.call(Attribute::parse_outer)?;
let mut in_code = false; let mut in_code = false;