Skip to content

Commit

Permalink
staging: add [workspace.lints] to manifest
Browse files Browse the repository at this point in the history
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 rust-vmm#518

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
  • Loading branch information
epilys committed Nov 19, 2023
1 parent 2e8dc1b commit b8c7f65
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
26 changes: 26 additions & 0 deletions staging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 3 additions & 0 deletions staging/vhost-device-sound/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b8c7f65

Please sign in to comment.