Skip to content

Conversation

@Jules-Bertholet
Copy link
Contributor

@Jules-Bertholet Jules-Bertholet commented Aug 29, 2025

In the hope of being able to implement DerefMut in the future.

Changes Exclusive's methods to associated functions.

cc #98407

@rustbot label T-libs-api

In the hope of being able to implement `DerefMut` in the future.

Changes `Exclusive`'s methods to associated functions.
@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2025

r? @tgross35

rustbot has assigned @tgross35.
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 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. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Aug 29, 2025
@tgross35 tgross35 mentioned this pull request Sep 2, 2025
5 tasks
}
}

// FIXME: implement `DerefMut` when this becomes possible
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't immediately obvious how/why this is blocked and what would make it possible, could you link to your comment explaining it on the tracking issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tgross35
Copy link
Contributor

tgross35 commented Sep 2, 2025

Nominated for libs-api #98407 (comment)

@tgross35 tgross35 added S-waiting-on-team DEPRECATED: Use the team-based variants `S-waiting-on-t-lang`, `S-waiting-on-t-compiler`, ... and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 2, 2025
@bors
Copy link
Collaborator

bors commented Sep 28, 2025

☔ The latest upstream changes (presumably #147128) made this pull request unmergeable. Please resolve the merge conflicts.

@Amanieu Amanieu added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Oct 1, 2025
@Urgau Urgau added S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api and removed S-waiting-on-team DEPRECATED: Use the team-based variants `S-waiting-on-t-lang`, `S-waiting-on-t-compiler`, ... labels Oct 6, 2025
@Amanieu Amanieu removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Oct 7, 2025
@joshtriplett
Copy link
Member

joshtriplett commented Oct 21, 2025

We talked about this again in today's @rust-lang/libs-api meeting.

It doesn't seem like trying to work towards DerefMut-without-Deref is worth the complexity for this one type; it doesn't seem likely that that capability will get much use. And adding DerefMut also means making this type's methods less conveniently usable. You can always do .get_mut().method().

If in the future we want to make this work with arbitrary self types, or if the idea of doing DerefMut ends up going through further discussion and reaching consensus, we can always add this later. But it doesn't seem critical to add it speculatively in the hopes of enabling future work that we may not end up wanting to do.

Is there another reason to add this in advance, given that it's an unstable trait being implemented for an unstable type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants