Skip to content

Conversation

npmccallum
Copy link
Contributor

Cow already has a Deref<Target=B> implementation that is const when the Borrow impl from the owned type is also const. However, none of the major types actually implement this, so the Deref impl doesn't really work.

This change constifies the two major Cow::Owned types so that the Deref impl on Cow will work for those two types.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 14, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

`Cow` already has a `Deref<Target=B>` implementation that is
`const` when the `Borrow` impl from the owned type is also
`const`. However, none of the major types actually implement
this, so the `Deref` impl doesn't really work.

This change constifies the two major `Cow::Owned` types so that
the `Deref` impl on `Cow` will work for those two types.
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

3 participants