Skip to content

stabilize smart pointer map functions - #160534

Open
Qelxiros wants to merge 1 commit into
rust-lang:mainfrom
Qelxiros:stabilize-smart-pointer-map
Open

stabilize smart pointer map functions#160534
Qelxiros wants to merge 1 commit into
rust-lang:mainfrom
Qelxiros:stabilize-smart-pointer-map

Conversation

@Qelxiros

@Qelxiros Qelxiros commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

View all comments

Tracking issue: #144419
@rustbot modify labels: +T-libs-api

@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 Aug 4, 2026
@rustbot

rustbot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

r? @Darksonn

rustbot has assigned @Darksonn.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from 6 candidates

@rustbot rustbot added the T-libs-api [DEPRECATED; DO NOT USE] label Aug 4, 2026
@rustbot

This comment has been minimized.

@Qelxiros
Qelxiros force-pushed the stabilize-smart-pointer-map branch from a55c402 to 8279572 Compare August 4, 2026 23:44
@rustbot

This comment has been minimized.

@Darksonn

Darksonn commented Aug 5, 2026

Copy link
Copy Markdown
Member

Sorry I'm at capacity for the next two weeks.

@rustbot reroll

@rustbot rustbot assigned nia-e and unassigned Darksonn Aug 5, 2026
@nia-e nia-e added needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 5, 2026
@rust-rfcbot

rust-rfcbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

@dtolnay 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.

@rust-rfcbot rust-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. and removed needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. labels Aug 5, 2026
@clarfonthey clarfonthey removed the T-libs-api [DEPRECATED; DO NOT USE] label Aug 12, 2026
@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Aug 18, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

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

@maxdexh

maxdexh commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Is there a reason custom allocators were not included in the implementation?

@nia-e

nia-e commented Aug 23, 2026

Copy link
Copy Markdown
Member

...huh. It might honestly just be an oversight? I think it should be sound.

cc @Amanieu @BurntSushi @dtolnay @joshtriplett @the8472 (can't ping the old libs-api anymore) as ppl with checkboxes here - should we block this on adding an allocator param?

@nia-e nia-e added the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 23, 2026
@maxdexh

maxdexh commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Allocators are not stable API anyway. The implementation looks simple enough that it should be possible to just jam it in, except that the transmute in Box::map needs to be into_raw_with... + from_raw_in (why is it even using transmute for this?)

If you want I can just write a PR right now

@nia-e

nia-e commented Aug 23, 2026

Copy link
Copy Markdown
Member

Wouldn't it be breaking to move this later from an impl for Box<T> into impl for Box<T, A>? if not then ignore me ^^

@rust-bors

This comment has been minimized.

pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 26, 2026
Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`

Adds custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`.

Not on `UniqueArc`/`UniqueRc` because too much allocator-related API is missing atm and I didn't want to end up writing unsound garbage. The `else` branch in those needs to drop a weakref, I'll get to that later.

cc rust-lang/rust#160534

r? nia-e
@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. labels Aug 28, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

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.

@maxdexh

maxdexh commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Shouldn't the methods on UniqueArc/UniqueRc be marked #[unstable(feature = "unique_rc_arc", issue = "112566")] instead of stable? Or is it okay to have a stable function on an unstable type?

@nia-e

nia-e commented Aug 28, 2026

Copy link
Copy Markdown
Member

yep, that shouldn't be the case. i haven't started reviewing this yet but that would need to be fixed before this can land

@maxdexh

maxdexh commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

this also needs a rebase

@nia-e

nia-e commented Aug 28, 2026

Copy link
Copy Markdown
Member

seems good other than max's comment, plus rebasing.

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2026
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 28, 2026
@Qelxiros
Qelxiros force-pushed the stabilize-smart-pointer-map branch from 8279572 to 894188d Compare August 29, 2026 20:52
@rustbot

This comment has been minimized.

@Qelxiros
Qelxiros force-pushed the stabilize-smart-pointer-map branch from 894188d to f178ee0 Compare August 29, 2026 20:58
@rustbot

rustbot commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main 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.

@Qelxiros
Qelxiros force-pushed the stabilize-smart-pointer-map branch from f178ee0 to 3ecb376 Compare August 29, 2026 21:01
@Qelxiros

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@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 Aug 29, 2026
@maxdexh

maxdexh commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

I think you removed the stabilization changes on Rc, Arc and Box ^^

@Qelxiros

Copy link
Copy Markdown
Contributor Author

Sorry about that; I'm having a moment with rebases apparently

@maxdexh

maxdexh commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Sorry for hitting you with a merge conflict during an fcp :D

@Qelxiros
Qelxiros force-pushed the stabilize-smart-pointer-map branch from 3ecb376 to 82ee18a Compare August 29, 2026 21:34
@Qelxiros

Copy link
Copy Markdown
Contributor Author

All good, should be better now

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. 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. to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants