From b8c7f655ff7201f1d4d4f3e0ae936603463fb0ef Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sun, 19 Nov 2023 14:18:00 +0200 Subject: [PATCH] staging: add [workspace.lints] to manifest From Rust 1.74 and onwards, this section enables opt-in lints for crates of this workspace. Read more information at https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html For a crate to opt-in, it needs to set [lints] workspace = true In its Cargo.toml Closes #518 Signed-off-by: Manos Pitsidianakis --- staging/Cargo.toml | 26 ++++++++++++++++++++++++++ staging/vhost-device-sound/Cargo.toml | 3 +++ 2 files changed, 29 insertions(+) diff --git a/staging/Cargo.toml b/staging/Cargo.toml index 3ab597f7..68efa53d 100644 --- a/staging/Cargo.toml +++ b/staging/Cargo.toml @@ -4,3 +4,29 @@ members = [ "vhost-device-sound", "vhost-device-video", ] + +[workspace.lints.clippy] +enum_glob_use = "deny" +# groups +correctness = "deny" +suspicious = "deny" +complexity = "deny" +perf = "deny" +style = "deny" +nursery = "deny" +# restriction +dbg_macro = "deny" +rc_buffer = "deny" +as_underscore = "deny" +assertions_on_result_states = "deny" +# pedantic +cast_lossless = "deny" +cast_possible_wrap = "deny" +cast_ptr_alignment = "deny" +naive_bytecount = "deny" +ptr_as_ptr = "deny" +bool_to_int_with_if = "deny" +borrow_as_ptr = "deny" +case_sensitive_file_extension_comparisons = "deny" +significant_drop_in_scrutinee = "allow" +significant_drop_tightening = "allow" diff --git a/staging/vhost-device-sound/Cargo.toml b/staging/vhost-device-sound/Cargo.toml index 9bf2b701..a5b4aff3 100644 --- a/staging/vhost-device-sound/Cargo.toml +++ b/staging/vhost-device-sound/Cargo.toml @@ -35,3 +35,6 @@ rstest = "0.18.2" tempfile = "3.8" virtio-queue = { version = "0.10", features = ["test-utils"] } vm-memory = { version = "0.13.1", features = ["backend-mmap", "backend-atomic"] } + +[lints] +workspace = true