rustc
allowed-by-default lints: https://doc.rust-lang.org/rustc/lints/listing/allowed-by-defaultclippy
lints: https://rust-lang.github.io/rust-clippy/stable/index.html
unsafe_code
#![forbid(unsafe_code)]
clippy::exit
clippy::future_not_send
clippy::missing_inline_in_public_items
clippy::must_use_candidate
clippy::pattern_type_mismatch
clippy::exhaustive_enums
//#[non_exhaustive]
clippy::exhaustive_structs
//#[non_exhaustive]
clippy::must_use_unit
//#[must_use]
clippy::cargo_common_metadata
#![forbid(clippy::exit)]
#![deny(clippy::pattern_type_mismatch)]
#![warn(
clippy::future_not_send,
clippy::exhaustive_enums,
clippy::exhaustive_structs,
clippy::must_use_unit,
clippy::missing_inline_in_public_items,
clippy::must_use_candidate,
)]
must_not_suspend
//#[must_not_suspend]
fuzzy_provenance_casts
lossy_provenance_casts
meta_variable_misuse
missing_abi
missing_copy_implementations
missing_debug_implementations
missing_docs
non_local_definitions
unnameable_types
unreachable_pub
unsafe_op_in_unsafe_fn
clippy::arithmetic_side_effects
clippy::as_conversions
ORclippy::cast_lossless
&clippy::cast_possible_truncation
&clippy::cast_possible_wrap
&clippy::cast_possible_truncation
&clippy::cast_precision_loss
&clippy::cast_sign_loss
&clippy::char_lit_as_u8
&clippy::ref_as_ptr
&clippy::ptr_as_ptr
&clippy::checked_conversions
&clippy::borrow_as_ptr
&clippy::ref_as_ptr
clippy::case_sensitive_file_extension_comparisons
clippy::cfg_not_test
clippy::clear_with_drain
clippy::clone_on_ref_ptr
clippy::cloned_instead_of_copied
clippy::collection_is_never_read
clippy::create_dir
clippy::debug_assert_with_mut_call
clippy::derive_partial_eq_without_eq
clippy::error_impl_error
clippy::fallible_impl_from
clippy::filetype_is_file
clippy::filter_map_next
clippy::flat_map_option
clippy::fn_to_numeric_cast_any
clippy::format_push_string
clippy::index_refutable_slice
clippy::indexing_slicing
clippy::inefficient_to_string
clippy::infinite_loop
clippy::iter_filter_is_ok
clippy::iter_not_returning_iterator
clippy::iter_on_empty_collections
clippy::iter_on_single_items
clippy::iter_with_drain
clippy::large_stack_arrays
clippy::large_types_passed_by_value
clippy::linkedlist
clippy::manual_instant_elapsed
clippy::match_on_vec_items
clippy::match_same_arms
clippy::match_wild_err_arm
clippy::match_wildcard_for_single_variants
clippy::mem_forget
clippy::mismatching_type_param_order
clippy::missing_assert_message
clippy::missing_const_for_fn
clippy::missing_docs_in_private_items
clippy::missing_errors_doc
clippy::missing_panics_doc
clippy::mut_mut
clippy::mutex_atomic
clippy::mutex_integer
clippy::needless_collect
clippy::needless_pass_by_ref_mut
clippy::needless_pass_by_value
clippy::option_as_ref_cloned
clippy::option_option
clippy::panic
clippy::panic_in_result_fn
clippy::path_buf_push_overwrite
clippy::pathbuf_init_then_push
clippy::ptr_cast_constness
clippy::rc_buffer
clippy::rc_mutex
clippy::redundant_pub_crate
clippy::shadow_unrelated
clippy::should_panic_without_expect
clippy::significant_drop_in_scrutinee
&clippy::significant_drop_tightening
// read the docsclippy::str_split_at_newline
clippy::str_to_string
clippy::string_add
clippy::string_lit_as_bytes
clippy::string_lit_chars_any
clippy::string_to_string
clippy::tests_outside_test_module
clippy::trait_duplication_in_bounds
clippy::unchecked_duration_subtraction
clippy::unicode_not_nfc
clippy::uninhabited_references
clippy::unnecessary_box_returns
clippy::unnecessary_join
clippy::unused_peekable
clippy::unwrap_used
&clippy::expect_used
clippy::verbose_file_reads
clippy::while_float
unit_bindings
clippy::allow_attributes_without_reason
clippy::assertions_on_result_states
clippy::bool_to_int_with_if
clippy::dbg_macro
&clippy::print_stderr
&clippy::print_stdout
// release-onlyclippy::default_trait_access
clippy::empty_line_after_doc_comments
clippy::enum_glob_use
clippy::equatable_if_let
clippy::fn_params_excessive_bools
clippy::from_iter_instead_of_collect
clippy::if_then_some_else_none
clippy::ignored_unit_patterns
clippy::implicit_clone
clippy::items_after_statements
clippy::manual_c_str_literals
clippy::manual_is_variant_and
clippy::manual_let_else
clippy::manual_ok_or
clippy::manual_string_new
clippy::many_single_char_names
clippy::map_err_ignore
clippy::match_bool
clippy::module_name_repetitions
clippy::multiple_inherent_impl
clippy::multiple_unsafe_ops_per_block
clippy::non_ascii_idents
ORnon_ascii_idents
clippy::option_if_let_else
clippy::partial_pub_fields
clippy::pub_underscore_fields
clippy::redundant_closure_for_method_calls
clippy::ref_patterns
clippy::rest_pat_in_fully_bound_structs
clippy::return_self_not_must_use
clippy::same_name_method
clippy::self_named_module_files
clippy::semicolon_if_nothing_returned
clippy::shadow_same
clippy::single_char_pattern
clippy::single_match_else
clippy::struct_field_names
clippy::uninlined_format_args
clippy::unreadable_literal
clippy::unused_result_ok
clippy::use_self
clippy::used_underscore_binding
clippy::verbose_bit_mask
unused_crate_dependencies
clippy::negative_feature_names
clippy::redundant_feature_names
clippy::unnecessary_safety_comment
clippy::unnecessary_safety_doc
clippy::wildcard_dependencies
#![cfg_attr(
all(not(test), not(debug_assertions)),
warn(
clippy::dbg_macro,
clippy::print_stderr,
clippy::print_stdout,
clippy::unwrap_used,
clippy::expect_used,
unused_crate_dependencies,
)
)]
#![forbid(
meta_variable_misuse,
non_local_definitions,
unnameable_types,
unreachable_pub,
clippy::cast_lossless,
clippy::cast_possible_truncation,
clippy::cast_possible_wrap,
clippy::cast_possible_truncation,
clippy::cast_precision_loss,
clippy::cast_sign_loss,
clippy::fn_to_numeric_cast_any,
clippy::char_lit_as_u8,
clippy::ref_as_ptr,
clippy::ptr_as_ptr,
clippy::checked_conversions,
clippy::borrow_as_ptr,
clippy::ref_as_ptr,
clippy::clear_with_drain,
clippy::clone_on_ref_ptr,
clippy::debug_assert_with_mut_call,
clippy::error_impl_error,
clippy::fallible_impl_from,
clippy::format_push_string,
clippy::index_refutable_slice,
clippy::indexing_slicing,
clippy::inefficient_to_string,
clippy::iter_not_returning_iterator,
clippy::manual_instant_elapsed,
clippy::match_on_vec_items,
clippy::mut_mut,
clippy::mutex_atomic,
clippy::mutex_integer,
clippy::path_buf_push_overwrite,
clippy::vec_init_then_push,
clippy::ptr_cast_constness,
clippy::rc_mutex,
clippy::shadow_unrelated,
clippy::string_add,
clippy::string_lit_as_bytes,
clippy::string_to_string,
clippy::tests_outside_test_module,
clippy::trait_duplication_in_bounds,
clippy::unchecked_duration_subtraction,
clippy::allow_attributes_without_reason,
non_ascii_idents,
)]
#![deny(
missing_abi,
unsafe_op_in_unsafe_fn,
clippy::cloned_instead_of_copied,
clippy::filetype_is_file,
clippy::flat_map_option,
clippy::large_stack_arrays,
clippy::large_types_passed_by_value,
clippy::match_same_arms,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::needless_collect,
clippy::option_as_ref_cloned,
clippy::option_option,
clippy::should_panic_without_expect,
clippy::str_split_at_newline,
clippy::str_to_string,
clippy::string_lit_chars_any,
clippy::unicode_not_nfc,
clippy::uninhabited_references,
clippy::verbose_file_reads,
clippy::while_float,
clippy::empty_line_after_doc_comments,
clippy::wildcard_dependencies,
)]
#![warn(
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
clippy::arithmetic_side_effects,
clippy::case_sensitive_file_extension_comparisons,
clippy::collection_is_never_read,
clippy::create_dir,
clippy::derive_partial_eq_without_eq,
clippy::filter_map_next,
clippy::flat_map_option,
clippy::infinite_loop,
clippy::iter_filter_is_ok,
clippy::iter_on_empty_collections,
clippy::iter_with_drain,
clippy::linkedlist,
clippy::match_wild_err_arm,
clippy::match_wildcard_for_single_variants,
clippy::mem_forget,
clippy::mismatching_type_param_order,
clippy::missing_assert_message,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::needless_pass_by_ref_mut,
clippy::needless_pass_by_value,
clippy::panic_in_result_fn,
clippy::rc_buffer,
clippy::unnecessary_box_returns,
clippy::unnecessary_join,
clippy::unused_peekable,
unit_bindings,
clippy::assertions_on_result_states,
clippy::bool_to_int_with_if,
clippy::default_trait_access,
clippy::enum_glob_use,
clippy::equatable_if_let,
clippy::fn_params_excessive_bools,
clippy::from_iter_instead_of_collect,
clippy::if_then_some_else_none,
clippy::ignored_unit_patterns,
clippy::implicit_clone,
clippy::items_after_statements,
clippy::manual_c_str_literals,
clippy::manual_is_variant_and,
clippy::manual_let_else,
clippy::manual_ok_or,
clippy::manual_string_new,
clippy::many_single_char_names,
clippy::map_err_ignore,
clippy::match_bool,
clippy::module_name_repetitions,
clippy::multiple_inherent_impl,
clippy::multiple_unsafe_ops_per_block,
clippy::option_if_let_else,
clippy::partial_pub_fields,
clippy::pub_underscore_fields,
clippy::redundant_closure_for_method_calls,
clippy::ref_patterns,
clippy::rest_pat_in_fully_bound_structs,
clippy::return_self_not_must_use,
clippy::same_name_method,
clippy::self_named_module_files,
clippy::semicolon_if_nothing_returned,
clippy::shadow_same,
clippy::single_char_pattern,
clippy::single_match_else,
clippy::struct_field_names,
clippy::uninlined_format_args,
clippy::unreadable_literal,
clippy::use_self,
clippy::used_underscore_binding,
clippy::verbose_bit_mask,
clippy::negative_feature_names,
clippy::redundant_feature_names,
clippy::unnecessary_safety_comment,
clippy::unnecessary_safety_doc,
)]
clippy::float_arithmetic
clippy::float_cmp
clippy::float_cmp_const
clippy::imprecise_flops
clippy::suboptimal_flops
clippy::suspicious_xor_used_as_pow
clippy::while_float
clippy::lossy_float_literal
clippy::default_numeric_fallback
clippy::cast_precision_loss
clippy::panic
clippy::unwrap_used
clippy::expect_used
clippy::dbg_macro
clippy::print_stderr
clippy::print_stdout