From 43a75104276b83aca0bcb13b9a4dfbd2de895fce Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Tue, 14 Jan 2025 13:20:51 -0500 Subject: [PATCH] Retemplate lints configuration --- Cargo.toml | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index acd048b..97a2715 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,6 +67,7 @@ inherits = "release" [lints.rust] # Lint groups: +deprecated_safe = { level = "deny", priority = -1 } future_incompatible = { level = "deny", priority = -1 } refining_impl_trait = { level = "deny", priority = -1 } rust_2018_idioms = { level = "deny", priority = -1 } @@ -78,8 +79,11 @@ dead_code = "warn" # Deny various allow-by-default lints: macro_use_extern_crate = "deny" missing_debug_implementations = "deny" +redundant_lifetimes = "deny" single_use_lifetimes = "deny" trivial_casts = "deny" +unit_bindings = "deny" +unnameable_types = "deny" unreachable_pub = "deny" unsafe_code = "deny" unsafe_op_in_unsafe_fn = "deny" @@ -89,15 +93,11 @@ unused_qualifications = "deny" # Deny various warn-by-default lints: ambiguous_glob_reexports = "deny" -bad_asm_style = "deny" break_with_label_and_loop = "deny" -clashing_extern_declarations = "deny" confusable_idents = "deny" const_item_mutation = "deny" -dangling_pointers_from_temporaries = "deny" deprecated = "deny" deprecated_where_clause_location = "deny" -deref_nullptr = "deny" drop_bounds = "deny" dropping_copy_types = "deny" dropping_references = "deny" @@ -109,8 +109,6 @@ forgetting_copy_types = "deny" forgetting_references = "deny" function_item_references = "deny" hidden_glob_reexports = "deny" -improper_ctypes = "deny" -improper_ctypes_definitions = "deny" inline_no_sanitize = "deny" internal_features = "deny" invalid_from_utf8 = "deny" @@ -120,7 +118,6 @@ invalid_value = "deny" irrefutable_let_patterns = "deny" mixed_script_confusables = "deny" named_arguments_used_positionally = "deny" -no_mangle_generic_items = "deny" non_contiguous_range_endpoints = "deny" non_fmt_panics = "deny" non_shorthand_field_patterns = "deny" @@ -131,16 +128,15 @@ private_bounds = "deny" private_interfaces = "deny" special_module_name = "deny" stable_features = "deny" +static_mut_refs = "deny" suspicious_double_ref_op = "deny" trivial_bounds = "deny" type_alias_bounds = "deny" unconditional_recursion = "deny" -undefined_naked_function_abi = "deny" unexpected_cfgs = "deny" ungated_async_fn_track_caller = "deny" unused_associated_type_bounds = "deny" unused_comparisons = "deny" -useless_ptr_null_checks = "deny" while_true = "deny" [lints.clippy] @@ -155,12 +151,11 @@ unimplemented = "warn" # Deny various allow-by-default lints: as_underscore = "deny" bool_to_int_with_if = "deny" -borrow_as_ptr = "deny" cast_possible_truncation = "deny" cast_possible_wrap = "deny" cast_precision_loss = "deny" -cast_ptr_alignment = "deny" cast_sign_loss = "deny" +cfg_not_test = "deny" checked_conversions = "deny" clear_with_drain = "deny" cloned_instead_of_copied = "deny" @@ -171,8 +166,7 @@ default_trait_access = "deny" derive_partial_eq_without_eq = "deny" doc_link_with_quotes = "deny" doc_markdown = "deny" -empty_line_after_doc_comments = "deny" -empty_line_after_outer_attr = "deny" +empty_enum_variants_with_brackets = "deny" empty_structs_with_brackets = "deny" equatable_if_let = "deny" exit = "deny" @@ -191,10 +185,13 @@ ignored_unit_patterns = "deny" impl_trait_in_params = "deny" implicit_clone = "deny" imprecise_flops = "deny" -infinite_loop = "deny" index_refutable_slice = "deny" +infinite_loop = "deny" +into_iter_without_iter = "deny" invalid_upcast_comparisons = "deny" items_after_statements = "deny" +iter_filter_is_ok = "deny" +iter_filter_is_some = "deny" iter_not_returning_iterator = "deny" iter_with_drain = "deny" large_futures = "deny" @@ -202,12 +199,14 @@ large_types_passed_by_value = "deny" linkedlist = "deny" lossy_float_literal = "deny" manual_assert = "deny" -manual_clamp = "deny" manual_instant_elapsed = "deny" +manual_is_power_of_two = "deny" +manual_is_variant_and = "deny" manual_let_else = "deny" manual_ok_or = "deny" manual_string_new = "deny" map_unwrap_or = "deny" +map_with_unused_argument_over_ranges = "deny" match_bool = "deny" match_wild_err_arm = "deny" mem_forget = "deny" @@ -225,15 +224,18 @@ needless_pass_by_ref_mut = "deny" needless_raw_string_hashes = "deny" needless_raw_strings = "deny" negative_feature_names = "deny" +non_zero_suggestions = "deny" +option_as_ref_cloned = "deny" or_fun_call = "deny" path_buf_push_overwrite = "deny" +pathbuf_init_then_push = "deny" +pub_underscore_fields = "deny" pub_without_shorthand = "deny" range_minus_one = "deny" range_plus_one = "deny" rc_buffer = "deny" rc_mutex = "deny" read_zero_byte_vec = "deny" -readonly_write_lock = "deny" redundant_clone = "deny" redundant_closure_for_method_calls = "deny" redundant_feature_names = "deny" @@ -241,14 +243,17 @@ ref_binding_to_reference = "deny" rest_pat_in_fully_bound_structs = "deny" same_functions_in_if_condition = "deny" semicolon_if_nothing_returned = "deny" +set_contains_or_insert = "deny" should_panic_without_expect = "deny" single_char_pattern = "deny" single_match_else = "deny" stable_sort_primitive = "deny" +str_split_at_newline = "deny" string_add_assign = "deny" string_lit_as_bytes = "deny" string_lit_chars_any = "deny" string_to_string = "deny" +struct_field_names = "deny" suboptimal_flops = "deny" trailing_empty_array = "deny" trait_duplication_in_bounds = "deny" @@ -258,8 +263,10 @@ type_repetition_in_bounds = "deny" unchecked_duration_subtraction = "deny" undocumented_unsafe_blocks = "deny" unicode_not_nfc = "deny" +uninhabited_references = "deny" uninlined_format_args = "deny" unnecessary_join = "deny" +unnecessary_literal_bound = "deny" unnecessary_safety_comment = "deny" unnecessary_safety_doc = "deny" unnecessary_self_imports = "deny" @@ -269,8 +276,11 @@ unneeded_field_pattern = "deny" unnested_or_patterns = "deny" unused_async = "deny" unused_peekable = "deny" +unused_result_ok = "deny" unused_rounding = "deny" unwrap_used = "deny" used_underscore_binding = "deny" +used_underscore_items = "deny" +while_float = "deny" wildcard_dependencies = "deny" zero_sized_map_values = "deny"