From 91ae6cbdcfa07b13644169205bad8dc962495941 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:31:49 +0000 Subject: [PATCH] Silence annoying lint warning (#177) 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 442d3fe9e..c731635c5 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)'] }