Types must be unique and monotonically increasing (using < instead of <=)
($last_type: expr, $type: expr, (static_value, $value: expr)) => { };
($last_type: expr, $type: expr, $fieldty: tt) => {
if let Some(t) = $last_type {
($last_type: expr, $type: expr, (static_value, $value: expr)) => { };
($last_type: expr, $type: expr, $fieldty: tt) => {
if let Some(t) = $last_type {
- debug_assert!(t <= $type);
+ #[allow(unused_comparisons)] // Note that $type may be 0 making the following comparison always false
+ (debug_assert!(t < $type))
}
$last_type = Some($type);
};
}
$last_type = Some($type);
};