fixup! Refactor FnDecl and FnSig flags into packed structs

This commit is contained in:
teor
2026-04-16 16:28:59 +10:00
parent dafb6bb801
commit a70f37baa6
+1 -1
View File
@@ -131,7 +131,6 @@ pub const fn as_str(&self) -> &'static str {
$($e_name::$variant $( { unwind: $uw } )* => $tok,)*
}
}
// ALL_VARIANTS.iter().position(|v| v == self), but const
// FIXME(FnSigKind): when PartialEq is stably const, use it instead
const fn internal_const_eq(&self, other: &Self) -> bool {
match (self, other) {
@@ -139,6 +138,7 @@ const fn internal_const_eq(&self, other: &Self) -> bool {
_ => false,
}
}
// ALL_VARIANTS.iter().position(|v| v == self), but const
pub const fn as_packed(&self) -> u8 {
let mut index = 0;
while index < $e_name::ALL_VARIANTS.len() {