Skip to content

Commit 8035543

Browse files
authored
Configure new check-cfg lint that coverage is an allowed option (#722)
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
1 parent 1f6f4f5 commit 8035543

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

wayland-backend/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
fn main() {
2+
println!("cargo:rustc-check-cfg=cfg(coverage)");
3+
24
if std::env::var("CARGO_FEATURE_LOG").ok().is_some() {
35
// build the client shim
46
cc::Build::new().file("src/sys/client_impl/log_shim.c").compile("log_shim_client");

wayland-client/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("cargo:rustc-check-cfg=cfg(coverage)");
3+
}

0 commit comments

Comments
 (0)