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

Don't emit unexpected cfgs in proc-macros #4284

Open daxpedda opened 1 day ago

daxpedda commented 1 day ago

This issue has been caused by recent changes in nightly: https://github.com/rust-lang/rust/pull/132577. unexpected_cfg is now emitted from proc-macros as well.

This PR simply avoids this by checking the cfg check in the macro itself, which is required anyway to enable the corresponding unstable features.