rust: build: establish a baseline of lints across all crates
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Nov 2024 10:42:00 +0000 (11:42 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Dec 2024 17:44:06 +0000 (18:44 +0100)
commit2f9eec8f72673f97766eba1682a75f06f16302cb
tree1e5ee74b2d81394db63a74edce42285265ffa340
parent7a35e2fb80df4c536cc808e498a259d96d0a804e
rust: build: establish a baseline of lints across all crates

Many lints that default to allow can be helpful in detecting bugs or
keeping the code style homogeneous.  Add them liberally, though perhaps
not as liberally as in hw/char/pl011/src/lib.rs.  In particular, enabling
entire groups can be problematic because of bitrot when new links are
added in the future.

For Clippy, this is actually a feature that is only present in Cargo
1.74.0 but, since we are not using Cargo to *build* QEMU, only developers
will need a new-enough cargo and only to run tools such as clippy.
The requirement does not apply to distros that are building QEMU.

Reviewed-by: Junjie Mao <junjie.mao@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/Cargo.toml
rust/hw/char/pl011/src/lib.rs
rust/qemu-api/src/bindings.rs