From 56739202cfbfe0f8d6459944d4e2e7507daea3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 25 Jun 2024 17:10:09 +0200 Subject: [PATCH] sdk: Disable new rustc warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue here seems to be that the `panic!` and `unreachable!()` macros used in the tests return `!`. In the future, `!` will not fallback to `()`, which is what `dependency_on_unit_never_type_fallback` checks. `add_event_handler` expects a function that returns an `EventHandlerResult`, but it is only implemented for `()`, not for `!`. A solution could be to implement that trait for `!` but it is an unstable feature right now. Signed-off-by: Kévin Commaille --- crates/matrix-sdk/src/event_handler/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/matrix-sdk/src/event_handler/mod.rs b/crates/matrix-sdk/src/event_handler/mod.rs index bc9eda34b..c0de0a5b4 100644 --- a/crates/matrix-sdk/src/event_handler/mod.rs +++ b/crates/matrix-sdk/src/event_handler/mod.rs @@ -692,6 +692,7 @@ mod tests { } #[async_test] + #[allow(dependency_on_unit_never_type_fallback)] async fn add_room_event_handler() -> crate::Result<()> { let client = logged_in_client(None).await; @@ -753,6 +754,7 @@ mod tests { } #[async_test] + #[allow(dependency_on_unit_never_type_fallback)] async fn remove_event_handler() -> crate::Result<()> { let client = logged_in_client(None).await;