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