-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Extend const_convert for Cow on From<&str> and From<String> #99733
Conversation
These implementations are trivially const - since they only create the enum structure without running any non-const code. const_convert is tracked by rust-lang#88674
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
@rust-lang/libs What's the status of I remember seeing a decision to stop doing some of the trait-level constification because that's not on stable yet, but I forget if it was just |
I'm not sure a decision has been made. CC @rust-lang/wg-const-eval (who might have an opinion too). |
This should be okay. We used to stop adding these to wait for some bugs to be fixed, but currently there aren't any bugs that can affect stable so this is fine. |
Hello. |
From the current reimplementation status, this is blocked for another few months. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since #110393, impl const Trait for Type
is no longer used in the standard library. See also #110395.
I'll close the PR since I don't think this is on track to be landable in this form anytime soon, but after the const trait impls story is better figured out I'd be happy to take a new PR or reopen this one.
Thanks anyway for the PR!
These implementations are trivially const - since they only create the enum structure
without running any non-const code.
const_convert is tracked by #88674