constify From impls for the Cow::Borrowed variant#146525
Conversation
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
This comment has been minimized.
This comment has been minimized.
|
Anybody reviewing this, please take a look at #146067 (comment) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@ibraheemdev The original objection was const constructors for types like |
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Poking through old PRs: this seems to not have conflicts and be okay with the latest library constification policies. @bors r+ rollup |
constify `From` impls for the `Cow::Borrowed` variant This issue is a follow-up PR from rust-lang#146067 with the controversial impls removed. This is useful in at least two cases: 1. Generic interfaces which may be `const`. 2. Conditional compilation (`&str` vs `Cow<str>`).
|
|
This pull request was unapproved. |
|
Right, the syntax has changed since this was written. My bad. |
|
Off the top of my head I believe it's now |
This issue is a follow-up PR from #146067 with the controversial impls removed.
This is useful in at least two cases:
const.&strvsCow<str>).