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