We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dafb6bb commit a70f37bCopy full SHA for a70f37b
1 file changed
compiler/rustc_abi/src/extern_abi.rs
@@ -131,14 +131,14 @@ macro_rules! abi_impls {
131
$($e_name::$variant $( { unwind: $uw } )* => $tok,)*
132
}
133
134
- // ALL_VARIANTS.iter().position(|v| v == self), but const
135
// FIXME(FnSigKind): when PartialEq is stably const, use it instead
136
const fn internal_const_eq(&self, other: &Self) -> bool {
137
match (self, other) {
138
$( ( $e_name::$variant $( { unwind: $uw } )* , $e_name::$variant $( { unwind: $uw } )* ) => true,)*
139
_ => false,
140
141
+ // ALL_VARIANTS.iter().position(|v| v == self), but const
142
pub const fn as_packed(&self) -> u8 {
143
let mut index = 0;
144
while index < $e_name::ALL_VARIANTS.len() {
0 commit comments