Skip to content

Commit b9fc11b

Browse files
committed
Clippy appeasement.
1 parent 652bc9f commit b9fc11b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blacklisted-names = []
2-
cyclomatic-complexity-threshold = 100
2+
cognitive-complexity-threshold = 100
33
single-char-binding-names-threshold = 15
44
# I HAVE THE POWER OF OLEG
55
type-complexity-threshold = 999999

macros/src/error.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use crate::lexer::Token;
12
use ansi_term::Style;
23
use lalrpop_util::ParseError::*;
3-
use crate::lexer::Token;
44
use proc_macro2::{Ident, TokenStream};
55
use quote::{quote, quote_spanned};
66

@@ -49,10 +49,7 @@ pub fn parse_error(input: &[Token], error: &ParseError) -> TokenStream {
4949
compile_error! { "invalid token" }
5050
}
5151
}
52-
UnrecognizedEOF {
53-
location: _,
54-
expected,
55-
} => {
52+
UnrecognizedEOF { expected, .. } => {
5653
let msg = format!(
5754
"unexpected end of macro; missing {}",
5855
pprint_tokens(&expected)

macros/src/parser.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// We REALLY don't want to lint the generated parser code.
2+
#![allow(clippy::all)]
3+
14
use lalrpop_util::lalrpop_mod;
25

36
lalrpop_mod!(pub grammar);

0 commit comments

Comments
 (0)