macro_rules! make_weak_head_type {
    ($Target:ty, $( #[$attr:meta] )* , ) => { ... };
    ($Target:ty, #[ typed(pure) ] , $( $extra:tt )*) => { ... };
    ($Target:ty, , $Type:ty, $( $extra:tt )*) => { ... };
    ($Target:ty, , $Type:ty) => { ... };
}
Expand description

This macro is used internally by typed.

We use this in order to reliably construct a “representative” type for the weak head reduction type. We need this because for some types of arguments (empty variants for an enum, fields or constructor arguments explicitly marked as #[typed(pure)], etc.) won’t directly implement the WeakHead trait; in such cases, we just synthesize a literal of the appropriate type.