-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Rust 1.80 upcoming warning: unexpected cfg
condition name: coverage_nightly
#370
Comments
cfg
condition name: coverage_nightly
cfg
condition name: coverage_nightly
See rust-lang/rust#124800 (coverage_nightly is listed in rust-lang/rust#124800 (comment)). |
Hopefully the last round. - Fix order of cuda install on Windows - Disable coverage on Linux because of this issue: taiki-e/cargo-llvm-cov#370
Heads up, with the release of rust-lang/cargo#13913 (in nightly-2024-05-19), Cargo has now gain the ability to declare
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] } Footnotes
|
This linter update seems to work for me at the package level, but not at the workspace level. Meaning if I put the line you had in every package's
Is there any way to have this configured at the workspace level? |
See cargo docs: https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table
You have to add the last one (lints.workspace = true). |
Heya, in the upcoming Rust 1.80, the following attribute will cause some
cargo
commands to fail (at least it causesclippy
onrustc 1.80.0-nightly (7d83a4c13 2024-05-06)
to fail):#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
Details are in this Rust blog post: Automatic checking of cfgs at compile-time
Error Message
The following error message appears when running clippy:
The Fix
Add a
build.rs
with the following:I think that's the right fix, as it got my build to pass.
If that's the right fix, then in
cargo-llvm-cov
it would be handy add it to theREADME.md
as part of set up.The text was updated successfully, but these errors were encountered: