rust: pl011: use default set of lints
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Feb 2025 14:34:16 +0000 (15:34 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Feb 2025 14:51:01 +0000 (15:51 +0100)
Being the first crate added to QEMU, pl011 has a rather restrictive
Clippy setup.  This can be sometimes a bit too heavy on its suggestions,
for example

error: this could be a `const fn`
   --> hw/char/pl011/src/device.rs:382:5
    |
382 | /     fn set_read_trigger(&mut self) {
383 | |         self.read_trigger = 1;
384 | |     }
    | |_____^

Just use the standard set that is present in rust/Cargo.toml, with
just a small adjustment to allow upper case acronyms which are used
for register names.

Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/hw/char/pl011/src/lib.rs

index e704daf6e3ed231b4289f5b7268e6301e338e1f3..3c72f1221ffd496630c32f8806ac9918d990d7e2 100644 (file)
 //! See [`PL011State`](crate::device::PL011State) for the device model type and
 //! the [`registers`] module for register types.
 
-#![deny(
-    clippy::correctness,
-    clippy::suspicious,
-    clippy::complexity,
-    clippy::perf,
-    clippy::nursery,
-    clippy::style
-)]
 #![allow(clippy::upper_case_acronyms)]
-#![allow(clippy::result_unit_err)]
 
 use qemu_api::c_str;