#[doc(hidden)]
pub trait ItIsnt {
const IS_SEND: bool = false;
const IS_SYNC: bool = false;
}
impl<X> ItIsnt for X {}
#[macro_export]
macro_rules! is_send_sync {
($ty:ty) => {{
#[allow(unused_imports)]
use $crate::ItIsnt;
struct Shallow<T>(T);
#[allow(dead_code)] impl<X: Send> Shallow<X> { const IS_SEND: bool = true; }
#[allow(dead_code)] impl<X: Sync> Shallow<X> { const IS_SYNC: bool = true; }
(Shallow::<$ty>::IS_SEND, Shallow::<$ty>::IS_SYNC)
}};
}
#[macro_export]
macro_rules! is_send {
($ty:ty) => {{
#[allow(unused_imports)]
use $crate::ItIsnt;
struct Shallow<T>(T);
#[allow(dead_code)] impl<X: Send> Shallow<X> { const IS_SEND: bool = true; }
Shallow::<$ty>::IS_SEND
}};
}
#[macro_export]
macro_rules! is_sync {
($ty:ty) => {{
#[allow(unused_imports)]
use $crate::ItIsnt;
struct Shallow<T>(T);
#[allow(dead_code)] impl<X: Sync> Shallow<X> { const IS_SYNC: bool = true; }
Shallow::<$ty>::IS_SYNC
}};
}