[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/38] rust: add --check-cfg test to rustc arguments
From: |
Paolo Bonzini |
Subject: |
[PULL 02/38] rust: add --check-cfg test to rustc arguments |
Date: |
Fri, 10 Jan 2025 19:45:43 +0100 |
rustc will check that every reachable #[cfg] matches a list of
the expected config names and values. Recent versions of rustc are
also complaining about #[cfg(test)], even if it is basically a standard
part of the language. So, always allow it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/rust/rustc_args.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/rust/rustc_args.py b/scripts/rust/rustc_args.py
index 5525b3886fa..d79dc6d81f1 100644
--- a/scripts/rust/rustc_args.py
+++ b/scripts/rust/rustc_args.py
@@ -215,6 +215,8 @@ def main() -> None:
if rustc_version >= (1, 80):
if args.lints:
+ print("--check-cfg")
+ print("test")
for cfg in sorted(cargo_toml.check_cfg):
print("--check-cfg")
print(cfg)
--
2.47.1
- [PULL 00/38] Rust, i386 patches for 2024-01-10, Paolo Bonzini, 2025/01/10
- [PULL 01/38] rust: fix --enable-debug-mutex, Paolo Bonzini, 2025/01/10
- [PULL 07/38] rust: qom: automatically use Drop trait to implement instance_finalize, Paolo Bonzini, 2025/01/10
- [PULL 09/38] rust: pl011: only leave embedded object initialization in instance_init, Paolo Bonzini, 2025/01/10
- [PULL 08/38] rust: qom: move device_id to PL011 class side, Paolo Bonzini, 2025/01/10
- [PULL 14/38] rust: hide warnings for subprojects, Paolo Bonzini, 2025/01/10
- [PULL 02/38] rust: add --check-cfg test to rustc arguments,
Paolo Bonzini <=
- [PULL 04/38] rust: add a utility module for compile-time type checks, Paolo Bonzini, 2025/01/10
- [PULL 16/38] make-release: only leave tarball of wrap-file subprojects, Paolo Bonzini, 2025/01/10
- [PULL 15/38] qom: remove unused field, Paolo Bonzini, 2025/01/10
- [PULL 03/38] rust: qom: add ParentField, Paolo Bonzini, 2025/01/10
- [PULL 10/38] rust: qom: make INSTANCE_POST_INIT take a shared reference, Paolo Bonzini, 2025/01/10
- [PULL 17/38] target/i386: improve code generation for BT, Paolo Bonzini, 2025/01/10
- [PULL 06/38] rust: macros: check that the first field of a #[derive(Object)] struct is a ParentField, Paolo Bonzini, 2025/01/10
- [PULL 05/38] rust: macros: check that #[derive(Object)] requires #[repr(C)], Paolo Bonzini, 2025/01/10