rustwasm / wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript
https://rustwasm.github.io/docs/wasm-bindgen/
Apache License 2.0
7.83k stars 1.08k forks source link

derive macro warning: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage` #4283

Open mirsella opened 2 days ago

mirsella commented 2 days ago

version: wasm-bindgen v0.2.95 Recent rust nightly version enabled by default the unexpected_cfgs, which lead to this warning:

warning: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
  --> game/src/lib.rs:29:1
   |
29 | #[wasm_bindgen]
   | ^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(wasm_bindgen_unstable_test_coverage)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: this warning originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)