stabilize smart pointer map functions - #160534
Conversation
|
r? @Darksonn rustbot has assigned @Darksonn. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
a55c402 to
8279572
Compare
|
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. |
|
Sorry I'm at capacity for the next two weeks. @rustbot reroll |
|
This stabilizes a subset of #144419 — just the
@rfcbot fcp merge libs-api |
|
@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. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
Is there a reason custom allocators were not included in the implementation? |
|
...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? |
|
Allocators are not stable API anyway. The implementation looks simple enough that it should be possible to just jam it in, except that the If you want I can just write a PR right now |
|
Wouldn't it be breaking to move this later from an |
|
I mean just changing it before stabilization without starting another FCP. Also I don't think it's breaking even if done later because it would take |
This comment was marked as resolved.
This comment was marked as resolved.
|
Alright I wrote a PR (#161617). Feel free to do whatever you want with it. If you decide to stabilize first, I'll update it afterwards |
|
Stabilizing |
|
Yup, we discussed this on zulip too. It's probably fine but it'll need some thinking |
…=nia-e 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#160534 r? nia-e
…=nia-e 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#160534 r? nia-e
…=nia-e 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#160534 r? nia-e
…=nia-e 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#160534 r? nia-e
…=nia-e 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#160534 r? nia-e
Rollup merge of #161617 - maxdexh:can-i-has-map-allocator, r=nia-e 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 #160534 r? nia-e
|
☔ The latest upstream changes (presumably #161772) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
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
Tracking issue: #144419
@rustbot modify labels: +T-libs-api