rust: cargo: store desired warning levels in workspace Cargo.toml
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Nov 2024 12:03:45 +0000 (13:03 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Dec 2024 17:44:06 +0000 (18:44 +0100)
commit90868c3dcec755f567426d1fad64e7611053778e
treec8f86f150afbd9338a8b7ad348ae88291da28347
parent97ed1e9c8e2b0744508ef61cac8a23bb1e107820
rust: cargo: store desired warning levels in workspace Cargo.toml

An extra benefit of workspaces is that they allow to place lint level
settings in a single Cargo.toml; the settings are then inherited by
packages in the workspace.

Correspondingly, teach rustc_args.py to get the unexpected_cfgs
configuration from the workspace Cargo.toml.

Note that it is still possible to allow or deny warnings per crate or
module, via the #![] attribute syntax.  The rust/qemu-api/src/bindings.rs
file is an example.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
meson.build
rust/Cargo.toml
rust/hw/char/pl011/Cargo.toml
rust/qemu-api-macros/Cargo.toml
rust/qemu-api/Cargo.toml
rust/qemu-api/meson.build
scripts/rust/rustc_args.py