+#[allow(dead_code)] // Depending on the compilation flags some variants are never used
+#[derive(Debug, PartialEq, Eq)]
+pub(crate) enum LockHeldState {
+ HeldByThread,
+ NotHeldByThread,
+ #[cfg(any(feature = "_bench_unstable", not(test)))]
+ Unsupported,
+}
+
+pub(crate) trait LockTestExt {
+ fn held_by_thread(&self) -> LockHeldState;
+}
+
+#[cfg(all(feature = "std", not(feature = "_bench_unstable"), test))]
+mod debug_sync;
+#[cfg(all(feature = "std", not(feature = "_bench_unstable"), test))]
+pub use debug_sync::*;