1[workspace] 2resolver = "2" 3members = [ 4 "qemu-api-macros", 5 "qemu-api", 6 "hw/char/pl011", 7] 8 9[workspace.lints.rust] 10unexpected_cfgs = { level = "deny", check-cfg = [ 11 'cfg(MESON)', 'cfg(HAVE_GLIB_WITH_ALIGNED_ALLOC)', 12 'cfg(has_offset_of)'] } 13 14# Occasionally, we may need to silence warnings and clippy lints that 15# were only introduced in newer Rust compiler versions. Do not croak 16# in that case; a CI job with rust_strict_lints == true disables this 17# and ensures that we do not have misspelled allow() attributes. 18unknown_lints = "allow" 19 20# Prohibit code that is forbidden in Rust 2024 21unsafe_op_in_unsafe_fn = "deny" 22 23[workspace.lints.rustdoc] 24private_intra_doc_links = "allow" 25 26broken_intra_doc_links = "deny" 27invalid_html_tags = "deny" 28invalid_rust_codeblocks = "deny" 29bare_urls = "deny" 30unescaped_backticks = "deny" 31redundant_explicit_links = "deny" 32 33[workspace.lints.clippy] 34# default-warn lints 35result_unit_err = "allow" 36should_implement_trait = "deny" 37# can be for a reason, e.g. in callbacks 38unused_self = "allow" 39 40# default-allow lints 41as_ptr_cast_mut = "deny" 42as_underscore = "deny" 43assertions_on_result_states = "deny" 44bool_to_int_with_if = "deny" 45borrow_as_ptr = "deny" 46cast_lossless = "deny" 47dbg_macro = "deny" 48debug_assert_with_mut_call = "deny" 49derive_partial_eq_without_eq = "deny" 50doc_markdown = "deny" 51empty_structs_with_brackets = "deny" 52ignored_unit_patterns = "deny" 53implicit_clone = "deny" 54macro_use_imports = "deny" 55missing_const_for_fn = "deny" 56missing_safety_doc = "deny" 57multiple_crate_versions = "deny" 58mut_mut = "deny" 59needless_bitwise_bool = "deny" 60needless_pass_by_ref_mut = "deny" 61no_effect_underscore_binding = "deny" 62option_option = "deny" 63or_fun_call = "deny" 64ptr_as_ptr = "deny" 65pub_underscore_fields = "deny" 66redundant_clone = "deny" 67redundant_closure_for_method_calls = "deny" 68redundant_else = "deny" 69redundant_pub_crate = "deny" 70ref_binding_to_reference = "deny" 71ref_option_ref = "deny" 72return_self_not_must_use = "deny" 73same_name_method = "deny" 74semicolon_inside_block = "deny" 75shadow_unrelated = "deny" 76significant_drop_in_scrutinee = "deny" 77significant_drop_tightening = "deny" 78suspicious_operation_groupings = "deny" 79transmute_ptr_to_ptr = "deny" 80transmute_undefined_repr = "deny" 81type_repetition_in_bounds = "deny" 82used_underscore_binding = "deny" 83 84# nice to have, but cannot be enabled yet 85#wildcard_imports = "deny" # still have many bindings::* imports 86#ptr_cast_constness = "deny" # needs 1.65.0 for cast_mut()/cast_const() 87 88# these may have false positives 89#option_if_let_else = "deny" 90cognitive_complexity = "deny" 91