From 31d5771ee128b3a3230d41614925fa834631cbaa Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 10 Dec 2024 17:35:46 +0000 Subject: [PATCH] Silence annoying lint warning Since https://github.com/rust-lang/rust/pull/132577 (currently in rust nightly), we get hundreds of lint warnings: ``` warning: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage` --> src/rust/lib.rs:83:1 | 83 | #[wasm_bindgen(start)] ``` The correct solution is to upgrade wasm-bindgen, but legend has it that is difficult. For now, let's silence the lint. --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 442d3fe..c731635 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,3 +84,8 @@ vergen = { version = "8.0.0", features = ["build", "git", "gitcl"] } git = "https://github.com/matrix-org/matrix-rust-sdk" default_features = false features = ["js", "automatic-room-key-forwarding"] + +[lints.rust] +# Workaround for https://github.com/rustwasm/wasm-bindgen/issues/4283, while we work up the courage to upgrade +# wasm-bindgen +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }