Skip to content

Commit

Permalink
rust: pl011: use default set of lints
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed Feb 7, 2025
1 parent 3502062 commit 9955093
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions rust/hw/char/pl011/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,7 @@
//! 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;

Expand Down

0 comments on commit 9955093

Please sign in to comment.