Skip to content

Commit

Permalink
Tune lints for 1.73 Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Oct 6, 2023
1 parent 88ebf1e commit f2d90bb
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# See full lints list at:
# https://rust-lang.github.io/rust-clippy/master/index.html

absolute-paths-allowed-crates = ["codegen", "syn"]

standard-macro-braces = [
{ name = "assert", brace = "(" },
{ name = "assert_eq", brace = "(" },
Expand Down
7 changes: 4 additions & 3 deletions codegen/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)]
#![forbid(non_ascii_idents, unsafe_code)]
#![warn(
clippy::absolute_paths,
clippy::as_conversions,
clippy::as_ptr_cast_mut,
clippy::assertions_on_result_states,
Expand Down Expand Up @@ -58,6 +59,7 @@
clippy::mutex_atomic,
clippy::mutex_integer,
clippy::needless_collect,
clippy::needless_pass_by_ref_mut,
clippy::needless_raw_strings,
clippy::nonstandard_macro_braces,
clippy::option_if_let_else,
Expand All @@ -70,6 +72,7 @@
clippy::pub_without_shorthand,
clippy::rc_buffer,
clippy::rc_mutex,
clippy::readonly_write_lock,
clippy::redundant_clone,
clippy::redundant_type_annotations,
clippy::ref_patterns,
Expand All @@ -82,6 +85,7 @@
clippy::str_to_string,
clippy::string_add,
clippy::string_lit_as_bytes,
clippy::string_lit_chars_any,
clippy::string_slice,
clippy::string_to_string,
clippy::suboptimal_flops,
Expand All @@ -93,7 +97,6 @@
clippy::transmute_undefined_repr,
clippy::trivial_regex,
clippy::try_err,
clippy::tuple_array_conversions,
clippy::undocumented_unsafe_blocks,
clippy::unimplemented,
clippy::unnecessary_safety_comment,
Expand All @@ -110,13 +113,11 @@
clippy::verbose_file_reads,
clippy::wildcard_enum_match_arm,
future_incompatible,
invalid_reference_casting,
let_underscore_drop,
meta_variable_misuse,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
noop_method_call,
semicolon_in_expressions_from_macros,
unreachable_pub,
unused_crate_dependencies,
Expand Down
7 changes: 4 additions & 3 deletions codegen/shim/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)]
#![forbid(non_ascii_idents, unsafe_code)]
#![warn(
clippy::absolute_paths,
clippy::as_conversions,
clippy::as_ptr_cast_mut,
clippy::assertions_on_result_states,
Expand Down Expand Up @@ -58,6 +59,7 @@
clippy::mutex_atomic,
clippy::mutex_integer,
clippy::needless_collect,
clippy::needless_pass_by_ref_mut,
clippy::needless_raw_strings,
clippy::nonstandard_macro_braces,
clippy::option_if_let_else,
Expand All @@ -70,6 +72,7 @@
clippy::pub_without_shorthand,
clippy::rc_buffer,
clippy::rc_mutex,
clippy::readonly_write_lock,
clippy::redundant_clone,
clippy::redundant_type_annotations,
clippy::ref_patterns,
Expand All @@ -82,6 +85,7 @@
clippy::str_to_string,
clippy::string_add,
clippy::string_lit_as_bytes,
clippy::string_lit_chars_any,
clippy::string_slice,
clippy::string_to_string,
clippy::suboptimal_flops,
Expand All @@ -93,7 +97,6 @@
clippy::transmute_undefined_repr,
clippy::trivial_regex,
clippy::try_err,
clippy::tuple_array_conversions,
clippy::undocumented_unsafe_blocks,
clippy::unimplemented,
clippy::unnecessary_safety_comment,
Expand All @@ -110,13 +113,11 @@
clippy::verbose_file_reads,
clippy::wildcard_enum_match_arm,
future_incompatible,
invalid_reference_casting,
let_underscore_drop,
meta_variable_misuse,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
noop_method_call,
semicolon_in_expressions_from_macros,
unreachable_pub,
unused_crate_dependencies,
Expand Down
4 changes: 2 additions & 2 deletions codegen/src/es/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ pub const fn concat_slices<T: Copy, const LEN: usize>(
// TODO: Use `assert_ne!()` here, once it's allowed in `const` context.
#[allow(clippy::manual_assert)]
if total_len != LEN {
panic!("Actual slices lengths mismatches the specified `LEN` const")
panic!("actual slices lengths mismatches the specified `LEN` const")
}
let Some(val) = first_elem else {
panic!("Specified `LEN` const cannot be zero")
panic!("specified `LEN` const cannot be zero")
};
val
};
Expand Down
7 changes: 4 additions & 3 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)]
#![forbid(non_ascii_idents, unsafe_code)]
#![warn(
clippy::absolute_paths,
clippy::as_conversions,
clippy::as_ptr_cast_mut,
clippy::assertions_on_result_states,
Expand Down Expand Up @@ -58,6 +59,7 @@
clippy::mutex_atomic,
clippy::mutex_integer,
clippy::needless_collect,
clippy::needless_pass_by_ref_mut,
clippy::needless_raw_strings,
clippy::nonstandard_macro_braces,
clippy::option_if_let_else,
Expand All @@ -70,6 +72,7 @@
clippy::pub_without_shorthand,
clippy::rc_buffer,
clippy::rc_mutex,
clippy::readonly_write_lock,
clippy::redundant_clone,
clippy::redundant_type_annotations,
clippy::ref_patterns,
Expand All @@ -82,6 +85,7 @@
clippy::str_to_string,
clippy::string_add,
clippy::string_lit_as_bytes,
clippy::string_lit_chars_any,
clippy::string_slice,
clippy::string_to_string,
clippy::suboptimal_flops,
Expand All @@ -93,7 +97,6 @@
clippy::transmute_undefined_repr,
clippy::trivial_regex,
clippy::try_err,
clippy::tuple_array_conversions,
clippy::undocumented_unsafe_blocks,
clippy::unimplemented,
clippy::unnecessary_safety_comment,
Expand All @@ -110,13 +113,11 @@
clippy::verbose_file_reads,
clippy::wildcard_enum_match_arm,
future_incompatible,
invalid_reference_casting,
let_underscore_drop,
meta_variable_misuse,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
noop_method_call,
semicolon_in_expressions_from_macros,
unreachable_pub,
unused_crate_dependencies,
Expand Down
7 changes: 4 additions & 3 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)]
#![forbid(non_ascii_idents)]
#![warn(
clippy::absolute_paths,
clippy::as_conversions,
clippy::as_ptr_cast_mut,
clippy::assertions_on_result_states,
Expand Down Expand Up @@ -58,6 +59,7 @@
clippy::mutex_atomic,
clippy::mutex_integer,
clippy::needless_collect,
clippy::needless_pass_by_ref_mut,
clippy::needless_raw_strings,
clippy::nonstandard_macro_braces,
clippy::option_if_let_else,
Expand All @@ -70,6 +72,7 @@
clippy::pub_without_shorthand,
clippy::rc_buffer,
clippy::rc_mutex,
clippy::readonly_write_lock,
clippy::redundant_clone,
clippy::redundant_type_annotations,
clippy::ref_patterns,
Expand All @@ -82,6 +85,7 @@
clippy::str_to_string,
clippy::string_add,
clippy::string_lit_as_bytes,
clippy::string_lit_chars_any,
clippy::string_slice,
clippy::string_to_string,
clippy::suboptimal_flops,
Expand All @@ -93,7 +97,6 @@
clippy::transmute_undefined_repr,
clippy::trivial_regex,
clippy::try_err,
clippy::tuple_array_conversions,
clippy::undocumented_unsafe_blocks,
clippy::unimplemented,
clippy::unnecessary_safety_comment,
Expand All @@ -110,13 +113,11 @@
clippy::verbose_file_reads,
clippy::wildcard_enum_match_arm,
future_incompatible,
invalid_reference_casting,
let_underscore_drop,
meta_variable_misuse,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
noop_method_call,
semicolon_in_expressions_from_macros,
unreachable_pub,
unused_crate_dependencies,
Expand Down
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)]
#![forbid(non_ascii_idents, unsafe_code)]
#![warn(
clippy::absolute_paths,
clippy::as_conversions,
clippy::as_ptr_cast_mut,
clippy::assertions_on_result_states,
Expand Down Expand Up @@ -58,6 +59,7 @@
clippy::mutex_atomic,
clippy::mutex_integer,
clippy::needless_collect,
clippy::needless_pass_by_ref_mut,
clippy::needless_raw_strings,
clippy::nonstandard_macro_braces,
clippy::option_if_let_else,
Expand All @@ -70,6 +72,7 @@
clippy::pub_without_shorthand,
clippy::rc_buffer,
clippy::rc_mutex,
clippy::readonly_write_lock,
clippy::redundant_clone,
clippy::redundant_type_annotations,
clippy::ref_patterns,
Expand All @@ -82,6 +85,7 @@
clippy::str_to_string,
clippy::string_add,
clippy::string_lit_as_bytes,
clippy::string_lit_chars_any,
clippy::string_slice,
clippy::string_to_string,
clippy::suboptimal_flops,
Expand All @@ -93,7 +97,6 @@
clippy::transmute_undefined_repr,
clippy::trivial_regex,
clippy::try_err,
clippy::tuple_array_conversions,
clippy::undocumented_unsafe_blocks,
clippy::unimplemented,
clippy::unnecessary_safety_comment,
Expand All @@ -110,13 +113,11 @@
clippy::verbose_file_reads,
clippy::wildcard_enum_match_arm,
future_incompatible,
invalid_reference_casting,
let_underscore_drop,
meta_variable_misuse,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
noop_method_call,
semicolon_in_expressions_from_macros,
unreachable_pub,
unused_crate_dependencies,
Expand Down

0 comments on commit f2d90bb

Please sign in to comment.