rust: add --check-cfg test to rustc arguments
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>
This commit is contained in:
parent
122748c83d
commit
1d03e9771e
@ -215,6 +215,8 @@ def main() -> None:
|
|||||||
|
|
||||||
if rustc_version >= (1, 80):
|
if rustc_version >= (1, 80):
|
||||||
if args.lints:
|
if args.lints:
|
||||||
|
print("--check-cfg")
|
||||||
|
print("cfg(test)")
|
||||||
for cfg in sorted(cargo_toml.check_cfg):
|
for cfg in sorted(cargo_toml.check_cfg):
|
||||||
print("--check-cfg")
|
print("--check-cfg")
|
||||||
print(cfg)
|
print(cfg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user