diff --git a/compiler/rustc_abi/src/extern_abi.rs b/compiler/rustc_abi/src/extern_abi.rs index 19073eddfc6a..95ba2ee3b78f 100644 --- a/compiler/rustc_abi/src/extern_abi.rs +++ b/compiler/rustc_abi/src/extern_abi.rs @@ -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() {