Skip to content

Implement (part of) ACP 429: add DerefMut to Lazy[Cell/Lock] #129334

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

Merged
merged 1 commit into from
May 10, 2025

Conversation

ChayimFriedman2
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 commented Aug 20, 2024

DerefMut is instantly stable, as a trait impl. That means this needs an FCP.

@rustbot label +needs-fcp

rust-lang/libs-team#429

@rustbot
Copy link
Collaborator

rustbot commented Aug 20, 2024

r? @joboet

rustbot has assigned @joboet.
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. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. labels Aug 20, 2024
@ChayimFriedman2
Copy link
Contributor Author

ChayimFriedman2 commented Aug 20, 2024

r​? libs-api

@joboet
Copy link
Member

joboet commented Aug 21, 2024

Weird, rustbot seems to be sleeping...
r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Aug 21, 2024
@rustbot rustbot assigned BurntSushi and unassigned joboet Aug 21, 2024
Copy link
Member

@joboet joboet left a comment

Choose a reason for hiding this comment

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

The implementation looks good to me, r=me with the nit resolved after the FCP completes.

@SteveLauC
Copy link
Contributor

Gentle ping on this PR, would love this to be merged soon:)

@ChayimFriedman2
Copy link
Contributor Author

@SteveLauC This depends on a T-libs-api member starting a FCP.

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

New APIs need to land as unstable. And an FCP isn't needed for that. There should also be a tracking issue. And the ACP should be linked.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 14, 2024
@scottmcm
Copy link
Member

Looks like this PR includes DerefMut, which is a trait impl, so that part does need an FCP.

Can you split this into two? One that's just T-libs and only adds unstable methods, and one that's T-libs-api with the stable trait impl. The former can land much more easily than the latter.

@ChayimFriedman2
Copy link
Contributor Author

@BurntSushi @scottmcm This PR needs FCP for DerefMut and force_mut(), which, as I said in the OP, I decided to make instantly stable because it makes little sense to separate it from DerefMut.

For get_mut(), I already opened a tracking issue: #129333. I can split the PR though.

@workingjubilee
Copy link
Member

DerefMut is instantly stable, as a trait impl; as such, I decided to also instantly stabilize force_mut(), since it makes little sense to have one but not the other. That means this needs an FCP.

so you're saying we could land force_mut() on nightly as unstable and then decide to stabilize DerefMut with it?

@ChayimFriedman2
Copy link
Contributor Author

DerefMut is instantly stable, as a trait impl; as such, I decided to also instantly stabilize force_mut(), since it makes little sense to have one but not the other. That means this needs an FCP.

so you're saying we could land force_mut() on nightly as unstable and then decide to stabilize DerefMut with it?

That's an option, but that's not what I'm doing in this PR. Instead, I instantly stabilize both.

@bors
Copy link
Collaborator

bors commented Sep 19, 2024

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

@ChayimFriedman2
Copy link
Contributor Author

@rustbot ready

I modified this to only add (immediately stable) DerefMut, after the other methods has been added unstably in #130476. This is now ready for FCP.

Although, libs-api may not want to include this until force_mut() stabilizes, or people may resort to this as a workaround (although I expect DerefMut to be used more often anyway, just like Deref vs. force()).

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 16, 2024
@Amanieu Amanieu removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Apr 29, 2025
@Amanieu
Copy link
Member

Amanieu commented Apr 29, 2025

FCP to stabilize DerefMut directly. force_mut remains unstable tracked under #129333.

@rfcbot merge

@Amanieu Amanieu removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Apr 29, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented Apr 29, 2025

Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Apr 29, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented Apr 29, 2025

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Apr 29, 2025
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels May 9, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented May 9, 2025

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@Amanieu
Copy link
Member

Amanieu commented May 9, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented May 9, 2025

📌 Commit b208706 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request May 10, 2025
… r=Amanieu

Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`

`DerefMut` is instantly stable, as a trait impl. That means this needs an FCP.

`@rustbot` label +needs-fcp

rust-lang/libs-team#429
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#129334 (Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`)
 - rust-lang#135015 (Partially stabilize LoongArch target features)
 - rust-lang#138736 (Sanitizers target modificators)
 - rust-lang#139562 (rustdoc: add a handle that makes sidebar resizing more obvious)
 - rust-lang#140151 (remove intrinsics::drop_in_place)
 - rust-lang#140660 (remove 'unordered' atomic intrinsics)
 - rust-lang#140783 (Update documentation of OnceLock::get_or_init.)
 - rust-lang#140789 (Update hermit-abi to 0.5.1)
 - rust-lang#140792 (Use intrinsics for `{f16,f32,f64,f128}::{minimum,maximum}` operations)
 - rust-lang#140862 (Enable non-leaf Frame Pointers for Arm64EC Windows)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 10, 2025
… r=Amanieu

Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`

`DerefMut` is instantly stable, as a trait impl. That means this needs an FCP.

`@rustbot` label +needs-fcp

rust-lang/libs-team#429
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#129334 (Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`)
 - rust-lang#139562 (rustdoc: add a handle that makes sidebar resizing more obvious)
 - rust-lang#140151 (remove intrinsics::drop_in_place)
 - rust-lang#140660 (remove 'unordered' atomic intrinsics)
 - rust-lang#140783 (Update documentation of OnceLock::get_or_init.)
 - rust-lang#140789 (Update hermit-abi to 0.5.1)
 - rust-lang#140792 (Use intrinsics for `{f16,f32,f64,f128}::{minimum,maximum}` operations)
 - rust-lang#140879 (1.87.0 release notes: remove nonsensical `~` operator)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#129334 (Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`)
 - rust-lang#139562 (rustdoc: add a handle that makes sidebar resizing more obvious)
 - rust-lang#140151 (remove intrinsics::drop_in_place)
 - rust-lang#140660 (remove 'unordered' atomic intrinsics)
 - rust-lang#140783 (Update documentation of OnceLock::get_or_init.)
 - rust-lang#140789 (Update hermit-abi to 0.5.1)
 - rust-lang#140879 (1.87.0 release notes: remove nonsensical `~` operator)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c6b9253 into rust-lang:master May 10, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 10, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2025
Rollup merge of rust-lang#129334 - ChayimFriedman2:more-lazy-methods, r=Amanieu

Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`

`DerefMut` is instantly stable, as a trait impl. That means this needs an FCP.

``@rustbot`` label +needs-fcp

rust-lang/libs-team#429
@ChayimFriedman2 ChayimFriedman2 deleted the more-lazy-methods branch May 10, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.