Fix declare_clippy_lint crate
This commit is contained in:
parent
d407778c75
commit
b4c90abb5f
@ -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 = []
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user