#[cfg(feature = "diagnostics_runtime_assertions")]
#[allow(unused_imports)]
pub use pretty_assertions::*;
#[macro_export]
macro_rules! a_true {
() => {};
( $($Rest:tt)* ) => {
assert!( $($Rest)* );
};
}
#[macro_export]
macro_rules! a_false {
() => {};
( $($Rest:tt)* ) => {
assert!( ! $($Rest)* );
};
}
#[macro_export]
macro_rules! a_id {
( $left:expr , $right:expr $(,)? ) => {
#[ cfg( feature = "diagnostics_runtime_assertions" ) ]
{
$crate::diagnostics_tools::assert_eq!( $left, $right );
}
#[ cfg( not( feature = "diagnostics_runtime_assertions" ) ) ]
{
assert_eq!( $left, $right );
}
};
( $left:expr, $right:expr, $($arg:tt)* ) => {
#[ cfg( feature = "diagnostics_runtime_assertions" ) ]
{
$crate::diagnostics_tools::assert_eq!( $left, $right, $($arg)* );
}
#[ cfg( not( feature = "diagnostics_runtime_assertions" ) ) ]
{
assert_eq!( $left, $right, $($arg)* );
}
};
}
#[macro_export]
macro_rules! a_not_id {
( $left:expr , $right:expr $(,)? ) => {
#[ cfg( feature = "diagnostics_runtime_assertions" ) ]
{
$crate::diagnostics_tools::assert_ne!( $left, $right );
}
#[ cfg( not( feature = "diagnostics_runtime_assertions" ) ) ]
{
assert_ne!( $left, $right );
}
};
( $left:expr, $right:expr, $($arg:tt)* ) => {
#[ cfg( feature = "diagnostics_runtime_assertions" ) ]
{
$crate::diagnostics_tools::assert_ne!( $left, $right, $($arg)* );
}
#[ cfg( not( feature = "diagnostics_runtime_assertions" ) ) ]
{
assert_ne!( $left, $right, $($arg)* );
}
};
}
#[macro_export]
macro_rules! a_dbg_true {
() => {};
( $($Rest:tt)* ) => {
debug_assert!( $($Rest)* );
};
}
#[macro_export]
macro_rules! a_dbg_false {
() => {};
( $($Rest:tt)* ) => {
debug_assert!( ! $($Rest)* );
};
}
#[macro_export]
macro_rules! a_dbg_id {
( $($arg:tt)* ) => {
if cfg!( debug_assertions ) {
$crate::a_id!( $($arg)* );
}
};
}
#[macro_export]
macro_rules! a_dbg_not_id {
( $($arg:tt)* ) => {
if cfg!( debug_assertions ) {
$crate::a_not_id!( $($arg)* );
}
};
}
#[macro_export]
macro_rules! cta_true {
( $($tokens:tt)* ) => { true };
}
#[macro_export]
macro_rules! cta_type_same_size {
( $($tokens:tt)* ) => { true };
}
#[macro_export]
macro_rules! cta_type_same_align {
( $($tokens:tt)* ) => { true };
}
#[macro_export]
macro_rules! cta_ptr_same_size {
( $($tokens:tt)* ) => { true };
}
#[macro_export]
macro_rules! cta_mem_same_size {
( $($tokens:tt)* ) => { true };
}
pub use a_true;
pub use a_id;
pub use a_false;
pub use cta_true;
pub use a_not_id;
pub use a_dbg_true;
pub use a_dbg_id;
pub use a_dbg_not_id;
pub use cta_type_same_size;
pub use cta_type_same_align;
pub use cta_ptr_same_size;
pub use cta_mem_same_size;
#[allow(unused_imports)]
pub mod orphan {
#[cfg(feature = "diagnostics_runtime_assertions")]
pub use pretty_assertions::*;
#[cfg(feature = "standalone_diagnostics_tools")]
pub use super::{a_true, a_id, a_false, cta_true, a_not_id, a_dbg_true, a_dbg_id, a_dbg_not_id,
cta_type_same_size, cta_type_same_align, cta_ptr_same_size, cta_mem_same_size};
}
#[allow(unused_imports)]
pub mod exposed {
#[cfg(feature = "diagnostics_runtime_assertions")]
pub use pretty_assertions::*;
#[cfg(feature = "standalone_diagnostics_tools")]
pub use super::{a_true, a_id, a_false, cta_true, a_not_id, a_dbg_true, a_dbg_id, a_dbg_not_id,
cta_type_same_size, cta_type_same_align, cta_ptr_same_size, cta_mem_same_size};
}
#[allow(unused_imports)]
pub mod prelude {
#[cfg(feature = "diagnostics_runtime_assertions")]
pub use pretty_assertions::*;
#[cfg(feature = "standalone_diagnostics_tools")]
pub use super::{a_true, a_id, a_false, cta_true, a_not_id, a_dbg_true, a_dbg_id, a_dbg_not_id,
cta_type_same_size, cta_type_same_align, cta_ptr_same_size, cta_mem_same_size};
}