Skip to content

Commit dc2e939

Browse files
committed
scylla: static assert ensuring caching session impls Debug
1 parent 3b83c93 commit dc2e939

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scylla/src/transport/caching_session.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ mod tests {
349349
use crate::transport::partitioner::PartitionerName;
350350
use crate::transport::session::Session;
351351
use crate::utils::test_utils::unique_keyspace_name;
352+
#[allow(deprecated)]
353+
use crate::LegacyCachingSession;
352354
use crate::{
353355
batch::{Batch, BatchStatement},
354356
prepared_statement::PreparedStatement,
@@ -780,4 +782,12 @@ mod tests {
780782
verify_partitioner().await;
781783
verify_partitioner().await;
782784
}
785+
786+
// NOTE: intentionally no `#[test]`: this is a compile-time test
787+
fn _caching_session_impls_debug() {
788+
fn assert_debug<T: std::fmt::Debug>() {}
789+
assert_debug::<CachingSession>();
790+
#[allow(deprecated)]
791+
assert_debug::<LegacyCachingSession>();
792+
}
783793
}

0 commit comments

Comments
 (0)