Skip to content

Conversation

epilys
Copy link
Member

@epilys epilys commented Nov 19, 2023

Summary of the PR

This PR enables all crates of the staging workspace to share lints. With 1.74 it is now possible to define them in Cargo.toml.

Note: In older versions you'll simply get a "warning: unused manifest key" when using cargo.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR are signed (with git commit -s), and the commit
    message has max 60 characters for the summary and max 75 characters for each
    description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

@stefano-garzarella
Copy link
Member

Yeah, LGTM, just a couple of questions:

  • should we also remove the lints in staging/vhost-device-sound/src/lib.rs ?
  • what about enable them also for other crates in staging, but also in the main workspace? (not for this PR, but we should open Issues and do it incrementally)

@epilys
Copy link
Member Author

epilys commented Nov 20, 2023

Yeah, LGTM, just a couple of questions:

* should we also remove the lints in `staging/vhost-device-sound/src/lib.rs` ?

We need to update the CI rust to 1.74 first, otherwise the lints won't be picked up from the workspace.

* what about enable them also for other crates in staging, but also in the main workspace? (not for this PR, but we should open Issues and do it incrementally)

Yeah, there might be a lot of errors. Incrementally sounds good!

@epilys epilys force-pushed the rust-1.74-lints branch 2 times, most recently from 399a656 to 9a3157d Compare September 20, 2024 06:56
@epilys epilys changed the title staging: add [workspace.lints] to manifest Add [workspace.lints] Aug 1, 2025
@epilys epilys marked this pull request as ready for review August 1, 2025 18:24
@epilys
Copy link
Member Author

epilys commented Aug 1, 2025

I was going through open PRs (github necromancy) to see if we could close something and decided to re-spin this. Only the first 2-3 commits are manual changes, the rest are mechanical clippy fixes (again...). Apologies for the noise in advance.

epilys added 14 commits August 4, 2025 12:25
dbg! does not use format specifiers and prints in stderr regardless of
log output. Use log::debug! instead.

Signed-off-by: Manos Pitsidianakis <[email protected]>
Replace type inferred raw pointer casts with .cast() method calls to
make intent clearer.

Signed-off-by: Manos Pitsidianakis <[email protected]>
casting usize as i32 might wrap around in 32-bit targets, we don't
target them, but clippy complains.

Signed-off-by: Manos Pitsidianakis <[email protected]>
Crates need to opt-in by setting:

    [lints]
    workspace = true

In their Cargo.toml file.

Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
@stefano-garzarella stefano-garzarella enabled auto-merge (rebase) August 4, 2025 10:26
@stefano-garzarella stefano-garzarella merged commit 94bc7bf into rust-vmm:main Aug 4, 2025
2 checks passed
@epilys epilys deleted the rust-1.74-lints branch August 4, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants