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

Extend const_convert for Cow on From<&str> and From<String> #99733

Closed

Conversation

nipunn1313
Copy link
Contributor

These implementations are trivially const - since they only create the enum structure
without running any non-const code.

const_convert is tracked by #88674

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
@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jul 25, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jul 25, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive
Copy link
Collaborator

r? @m-ou-se

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 25, 2022
@scottmcm
Copy link
Member

@rust-lang/libs What's the status of impl const these days?

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 ~const/?const or if it applied to these too.

@thomcc
Copy link
Member

thomcc commented Aug 26, 2022

I'm not sure a decision has been made.

CC @rust-lang/wg-const-eval (who might have an opinion too).

@fee1-dead
Copy link
Member

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.

@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 8, 2022
@anden3 anden3 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 14, 2023
@nipunn1313
Copy link
Contributor Author

Hello.
I wanted to check in on this one again!

@oli-obk
Copy link
Contributor

oli-obk commented Jul 25, 2023

From the current reimplementation status, this is blocked for another few months.

@oli-obk oli-obk added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 25, 2023
@dtolnay dtolnay assigned dtolnay and unassigned m-ou-se Sep 28, 2023
Copy link
Member

@dtolnay dtolnay left a 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!

@dtolnay dtolnay closed this Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.