Extend const_convert for Cow on From<&str> and From<String>#99733
Extend const_convert for Cow on From<&str> and From<String>#99733nipunn1313 wants to merge 1 commit intorust-lang:masterfrom
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. |
dtolnay
left a comment
There was a problem hiding this comment.
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