X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Flib.rs;h=8fdf63ffad0e7f370359a9a3922490f939d05587;hb=de1b62eacff9068a7d910c5b8e278c071af4a596;hp=3338803f9a0c771a7ef976a0afba9bd28d6ded7f;hpb=63698ecbbfec96998257424e0b09224182a81239;p=rust-lightning diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index 3338803f..8fdf63ff 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -30,8 +30,8 @@ #![cfg_attr(all(not(feature = "std"), not(test)), no_std)] -#![cfg_attr(all(any(test, feature = "_test_utils"), feature = "unstable"), feature(test))] -#[cfg(all(any(test, feature = "_test_utils"), feature = "unstable"))] extern crate test; +#![cfg_attr(all(any(test, feature = "_test_utils"), feature = "_bench_unstable"), feature(test))] +#[cfg(all(any(test, feature = "_test_utils"), feature = "_bench_unstable"))] extern crate test; #[cfg(not(any(feature = "std", feature = "no-std")))] compile_error!("at least one of the `std` or `no-std` features must be enabled"); @@ -143,8 +143,16 @@ mod prelude { pub use alloc::string::ToString; } +#[cfg(all(feature = "std", test))] +mod debug_sync; +#[cfg(all(feature = "backtrace", feature = "std", test))] +extern crate backtrace; + #[cfg(feature = "std")] mod sync { + #[cfg(test)] + pub use debug_sync::*; + #[cfg(not(test))] pub use ::std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard}; }