Skip to content

Commit

Permalink
Configure new check-cfg lint that coverage is an allowed option
Browse files Browse the repository at this point in the history
The lastest Rust nightly [adds checking for cfgs] and their possible
values.  This requires us to define via `build.rs` that `coverage` is a
valid `cfg`, and that it is a "boolean" without any allowed values.

[adds checking for cfgs]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
  • Loading branch information
MarijnS95 committed May 7, 2024
1 parent 1f6f4f5 commit 8e1860e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wayland-backend/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
fn main() {
println!("cargo:rustc-check-cfg=cfg(coverage)");

if std::env::var("CARGO_FEATURE_LOG").ok().is_some() {
// build the client shim
cc::Build::new().file("src/sys/client_impl/log_shim.c").compile("log_shim_client");
Expand Down
3 changes: 3 additions & 0 deletions wayland-client/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("cargo:rustc-check-cfg=cfg(coverage)");
}

0 comments on commit 8e1860e

Please sign in to comment.