#![cfg_attr(not(feature = "std"), no_std)]
#[doc(hidden)]
#[macro_export]
macro_rules! _matchand {
{ ; $b:block $($el:block)? } => { $b };
{ $p:pat = $e:expr; { } $($pp:pat = $ee:expr; { })+ ; $b:block $($el:block)?} => {
if let $p = $e { _matchand!($($pp = $ee ; {})* ; $b $($el)?) } $(else $el)?
};
{ $p:pat = $e:expr; { } ; $b:block $($el:block)? } => { if let $p = $e $b $(else $el)? };
}
#[doc(hidden)]
#[macro_export]
macro_rules! _select_op {
{ $x:expr ; $op:tt $a:expr } => { $x $op $a };
{ $x:expr ; $op:tt $a:expr ; ! } => { $a $op $x };
}
#[macro_export(local_inner_macros)]
macro_rules! bop {
{} => { };
{ let $($p:pat $(| $t:ty)? $(= $e:expr)?),*} => { $(let $p $(: $t)? $(= $e)?;)* };
{ $($l:lifetime :)? match && $($p:pat = $e:expr),* => $b:block else $el:block } => {
$($l :)? loop { _matchand!( $( $p = $e ; { } )* ; { break $($l)? $b ; }) ; break $($l)? $el; }
};
{ bool $($l:lifetime :)? match && $($p:pat = $e:expr),* => $b:block $(else $el:block)? } => {
$($l :)? loop { _matchand!( $( $p = $e ; { } )* ; { $b ; break $($l)? true; }) ; $($el ;)? break $($l)? false; }
};
{ !loop match && $($p:pat = $e:expr),* => $b:block else $el:block } => {
_matchand!( $( $p = $e ; { } )* ; { $b } { $el })
};
{ !loop bool match && $($p:pat = $e:expr),* => $b:block $(else $el:block)? } => {
_matchand!( $( $p = $e ; { } )* ; { $b ; true } { $($el ;)? false })
};
{ $x:expr $(;)? } => { $x };
{ || $x:expr $(;)? } => { $x };
{ && $x:expr $(;)? } => { $x };
{ = $x:ident $(;)? } => { };
{ || $x:expr ; $($op:tt $a:expr $(;$n:tt)?),* } => { $(_select_op!($x; $op $a $(;$n)?))||* };
{ && $x:expr ; $($op:tt $a:expr $(;$n:tt)?),* } => { $(_select_op!($x; $op $a $(;$n)?))&&* };
{ = $x:ident ; $($op:tt $a:expr $(;$n:tt)?),* } => { $($x = _select_op!($x; $op $a $(;$n)?));* ; };
{ || $x:expr ; $op:tt $(;)? } => { $x };
{ && $x:expr ; $op:tt $(;)? } => { $x };
{ = $x:ident ; $op:tt $(;)? } => { };
{ || $x:expr ; $op:tt ; $($a:expr $(;$n:tt)?),* } => { $(_select_op!($x; $op $a $(;$n)?))||* };
{ && $x:expr ; $op:tt ; $($a:expr $(;$n:tt)?),* } => { $(_select_op!($x; $op $a $(;$n)?))||* };
{ = $x:ident ; $op:tt ; $($a:expr $(;$n:tt)?),* } => { $($x = _select_op!($x; $op $a $(;$n)?));* ; };
{ $fname:ident ; $($v:expr),* => in && $t:expr } => { $($t.$fname($v))&&* };
{ $fname:ident ; $($v:expr),* => in || $t:expr } => { $($t.$fname($v))||* };
{ $fname:ident ; $v:expr => in && $($t:expr),* } => { $($t.$fname($v))&&* };
{ $fname:ident ; $v:expr => in || $($t:expr),* } => { $($t.$fname($v))||* };
{ $($fname:ident ;)? => in && $t:expr } => { false };
{ $($fname:ident ;)? => in || $t:expr } => { false };
{ $($fname:ident ;)? $v:expr => in && } => { false };
{ $($fname:ident ;)? $v:expr => in || } => { false };
{ $($v:expr),* => in && $t:expr } => { $($t.contains($v))&&* };
{ $($v:expr),* => in || $t:expr } => { $($t.contains($v))||* };
{ $v:expr => in && $($t:expr),* } => { $($t.contains($v))&&* };
{ $v:expr => in || $($t:expr),* } => { $($t.contains($v))||* };
}
#[cfg(feature = "side-effect")]
pub mod side_effect;
#[cfg(all(feature = "side-effect", feature = "re-exports"))]
pub use side_effect::*;
#[cfg(feature = "macro-lit")]
mod macro_lit;
#[cfg(feature = "macro-lit")]
pub use macro_lit::*;
#[cfg(feature = "named-into")]
pub mod named_into;
#[cfg(all(feature = "named-into", feature = "re-exports"))]
pub use named_into::*;
#[cfg(feature = "combin")]
pub mod combin;
#[cfg(all(feature = "combin", feature = "re-exports"))]
pub use combin::*;
#[cfg(all(feature = "chain_panic", feature = "std"))]
pub mod chain_panic;
#[cfg(all(feature = "chain_panic", feature = "std", feature = "re-exports"))]
pub use chain_panic::*;
#[cfg(feature = "chain_todo")]
pub mod chain_todo;
#[cfg(all(feature = "chain_todo", feature = "re-exports"))]
pub use chain_todo::*;
#[cfg(feature = "tuples")]
pub mod tuples {
pub use tuples::*;
}
#[cfg(all(feature = "tuples", feature = "re-exports"))]
pub use crate::tuples::*;
#[cfg(feature = "once_get")]
pub mod once_get;
#[cfg(all(feature = "once_get", feature = "re-exports"))]
pub use crate::once_get::*;
#[cfg(feature = "chain_drop")]
pub mod chain_drop;
#[cfg(all(feature = "chain_drop", feature = "re-exports"))]
pub use chain_drop::*;
#[cfg(test)]
mod tests;