Closed
Description
With -C check-cfg
stabilized in Cargo v1.80 and enabled by default (see rust-lang/cargo#13571), newly introduced cfg
s will emit compile errors when used inside the crate.
The solution is to emit cargo:rustc-check-cfg=cfg(your_cfg)
inside the build.rs
to register the new cfg
s, this will emit warnings in older versions of Rust because the feature is not stable, but at least it won't emit errors in Rust v1.80 (or currently nightly).
See the -C check-cfg
and the accompanying rustc-check-cfg
documentation.
Metadata
Metadata
Assignees
Labels
No labels
Activity