| de98c175 | 07-Nov-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
rust: build: move strict lints handling to rustc_args.py
Make Cargo use unknown_lints = "allow" as well. This is more future proof as we might add new lints to rust/Cargo.toml that are not supporte
rust: build: move strict lints handling to rustc_args.py
Make Cargo use unknown_lints = "allow" as well. This is more future proof as we might add new lints to rust/Cargo.toml that are not supported by older versions of rustc or clippy.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 90868c3d | 06-Nov-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
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 inherit
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>
show more ...
|
| 97ed1e9c | 07-Nov-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
rust: build: generate lint flags from Cargo.toml
Cargo.toml makes it possible to describe the desired lint level settings in a nice format. We can extend this to Meson-built crates, by teaching rus
rust: build: generate lint flags from Cargo.toml
Cargo.toml makes it possible to describe the desired lint level settings in a nice format. We can extend this to Meson-built crates, by teaching rustc_args.py to fetch lint and --check-cfg arguments from Cargo.toml. --check-cfg arguments come from the unexpected_cfgs lint as well as crate features
Start with qemu-api, since it already has a [lints.rust] table and an invocation of rustc_args.py.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|