aboutsummaryrefslogtreecommitdiff
path: root/scripts/rust
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rust')
-rw-r--r--scripts/rust/rustc_args.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/rust/rustc_args.py b/scripts/rust/rustc_args.py
index 5525b38..63b0748 100644
--- a/scripts/rust/rustc_args.py
+++ b/scripts/rust/rustc_args.py
@@ -104,10 +104,7 @@ def generate_lint_flags(cargo_toml: CargoTOML, strict_lints: bool) -> Iterable[s
else:
raise Exception(f"invalid level {level} for {prefix}{lint}")
- # This may change if QEMU ever invokes clippy-driver or rustdoc by
- # hand. For now, check the syntax but do not add non-rustc lints to
- # the command line.
- if k == "rust" and not (strict_lints and lint in STRICT_LINTS):
+ if not (strict_lints and lint in STRICT_LINTS):
lint_list.append(LintFlag(flags=[flag, prefix + lint], priority=priority))
if strict_lints:
@@ -215,6 +212,8 @@ def main() -> None:
if rustc_version >= (1, 80):
if args.lints:
+ print("--check-cfg")
+ print("cfg(test)")
for cfg in sorted(cargo_toml.check_cfg):
print("--check-cfg")
print(cfg)