Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for const fn for ToPrimitive? #341

Closed
tyrone-wu opened this issue Oct 22, 2024 · 1 comment
Closed

Support for const fn for ToPrimitive? #341

tyrone-wu opened this issue Oct 22, 2024 · 1 comment

Comments

@tyrone-wu
Copy link

Hello 👋. awesome crate!

I was wondering if it would be possible have another set of functions implemented from ToPrimitve be marked as const fn to directly return the primitive?

Thank you. 😸

@tyrone-wu
Copy link
Author

tyrone-wu commented Oct 23, 2024

Ah 😓, it looks like const fn in traits isn't allowed. However, it looks like there's some progress towards this!
rust-lang/rust#131985

Perhaps once this feature is available in nightly, I'll reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant