You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this technically possible? The discriminants of the enum variants are static const, I assume? However, I think I read that trait function implementations cannot be const fn in stable Rust.
The text was updated successfully, but these errors were encountered:
Would it be possible for
MyEnum.into()
to be a const function?Then I could use it like this, for example with something like the
bitfield-struct
crate:Unfortunately, as things stand:
Is this technically possible? The discriminants of the enum variants are static const, I assume? However, I think I read that trait function implementations cannot be
const fn
in stable Rust.The text was updated successfully, but these errors were encountered: