Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unexpected_cfgs lints with the latest rustc #574

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

asomers
Copy link
Owner

@asomers asomers commented May 5, 2024

The latest rustc attempts to detect invalid #[cfg()] values. But some of Mockall's tests conditionalize code on target_os = "multics" as an intentionally always-false condition. Suppress the lint for those files.

@asomers asomers mentioned this pull request May 5, 2024
@asomers asomers force-pushed the unexpected_cfgs branch from 0ca8990 to d162b60 Compare May 5, 2024 20:14
asomers added 2 commits May 5, 2024 18:09
The latest rustc attempts to detect invalid `#[cfg()]` values.  But some
of Mockall's tests conditionalize code on `target_os = "multics"` as an
intentionally always-false condition.  Suppress the lint for those
files.  Also, one CI test sets a custom "reprocheck" variable.  Add that
to the list of known variables.
Also, slightly improve upon 08a905e ,
by making the cast more explicit.
@asomers asomers force-pushed the unexpected_cfgs branch from a0522b5 to a806b0c Compare May 6, 2024 02:48
@asomers asomers merged commit a774f4e into master May 6, 2024
3 checks passed
@asomers asomers deleted the unexpected_cfgs branch May 6, 2024 02:53
asomers added a commit that referenced this pull request Jun 22, 2024
Rust 1.71 and earlier ignored build script outputs like
"cargo::name=value".  Rust nightly from around 5-May-2024 complains
about unexpected_cfgs , and the suggested solution is to add a
"cargo::name=value" output to the build script.  But intermediate Rust
versions including 1.73.0 treat that syntax as an error.  Happily, all
tested Rust versions accept and understand "cargo:name=value" (note the
single colon).

This fixes a regression introduced by #574 and not yet released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant