macro_rules! any {
() => { ... };
($L:ty $(, $R:ty)*) => { ... };
({ $L:expr } $(, { $R:expr })*) => { ... };
}
Expand description
Helper macro to compute whether
- any of a list of types, all implementing
crate::TypeLayout
, e.g.[T, U, V]
, - any of a list of braced expressions of type
crate::MaybeUninhabited
, e.g.[{ all![] }, { any![] }, { all![] }]
,
is inhabited.
any![]
resolves to crate::MaybeUninhabited::Uninhabited
.
For instance, an enum is inhabited iff any of its variants is inhabited.
The empty list of types is uninhabited. This macro resolves into either
crate::MaybeUninhabited::Inhabited
or
crate::MaybeUninhabited::Uninhabited
.