const_type_layout::inhabited

Macro any

Source
macro_rules! any {
    () => { ... };
    ($L:ty $(, $R:ty)*) => { ... };
    ({ $L:expr } $(, { $R:expr })*) => { ... };
}
Expand description

Helper macro to compute whether

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.