Skip to content

Commit

Permalink
Ignore more clippy lints at workspace level
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 23, 2024
1 parent ad19b47 commit 713f0fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ undocumented_unsafe_blocks = "warn"
# Suppress buggy or noisy clippy lints
bool_assert_comparison = { level = "allow", priority = 1 }
borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286
cast_lossless = { level = "allow", priority = 1 } # https://godbolt.org/z/Pv6vbGG6E
declare_interior_mutable_const = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665
doc_markdown = { level = "allow", priority = 1 }
float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725
Expand All @@ -88,6 +89,7 @@ manual_assert = { level = "allow", priority = 1 }
manual_range_contains = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395
missing_errors_doc = { level = "allow", priority = 1 }
module_name_repetitions = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+module_name_repetitions
naive_bytecount = { level = "allow", priority = 1 }
nonminimal_bool = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool
range_plus_one = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+range_plus_one
similar_names = { level = "allow", priority = 1 }
Expand All @@ -98,3 +100,4 @@ struct_field_names = { level = "allow", priority = 1 }
too_many_arguments = { level = "allow", priority = 1 }
too_many_lines = { level = "allow", priority = 1 }
type_complexity = { level = "allow", priority = 1 }
unreadable_literal = { level = "allow", priority = 1 }
5 changes: 2 additions & 3 deletions src/cfg_expr/expr/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ impl Expression {
let key = pred_key.take();
let val = pred_val.take();

let num_predicates = top.predicates.len()
+ usize::from(key.is_some())
+ usize::from(top.nest_level);
let num_predicates =
top.predicates.len() + key.is_some() as usize + top.nest_level as usize;

let func = match top.func {
Func::All(_) => Func::All(num_predicates),
Expand Down

0 comments on commit 713f0fb

Please sign in to comment.