From dc2e939ee847b1b5ba89ebe662aae89e84f3a9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20H=C3=B6ner?= Date: Sat, 28 Dec 2024 15:41:19 +0100 Subject: [PATCH] scylla: static assert ensuring caching session impls `Debug` --- scylla/src/transport/caching_session.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scylla/src/transport/caching_session.rs b/scylla/src/transport/caching_session.rs index debf0def60..a5b6416833 100644 --- a/scylla/src/transport/caching_session.rs +++ b/scylla/src/transport/caching_session.rs @@ -349,6 +349,8 @@ mod tests { use crate::transport::partitioner::PartitionerName; use crate::transport::session::Session; use crate::utils::test_utils::unique_keyspace_name; + #[allow(deprecated)] + use crate::LegacyCachingSession; use crate::{ batch::{Batch, BatchStatement}, prepared_statement::PreparedStatement, @@ -780,4 +782,12 @@ mod tests { verify_partitioner().await; verify_partitioner().await; } + + // NOTE: intentionally no `#[test]`: this is a compile-time test + fn _caching_session_impls_debug() { + fn assert_debug() {} + assert_debug::(); + #[allow(deprecated)] + assert_debug::(); + } }