Skip to content

Add custom allocators to (try_)map on Box, Rc, Arc - #161617

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:can-i-has-map-allocator
Aug 25, 2026
Merged

Add custom allocators to (try_)map on Box, Rc, Arc#161617
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:can-i-has-map-allocator

Conversation

@maxdexh

@maxdexh maxdexh commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

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

@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 23, 2026
@rust-log-analyzer

This comment has been minimized.

@maxdexh
maxdexh force-pushed the can-i-has-map-allocator branch from 62ce360 to c158e17 Compare August 23, 2026 19:04
@nia-e

nia-e commented Aug 25, 2026

Copy link
Copy Markdown
Member

straightforward enough. given that we're just moving around a preexisting method i think it's fair to skip acp on this.

@bors r+

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c158e17 has been approved by nia-e

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 25, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
…=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
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
…=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
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
…=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
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
…=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
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #158874 (hir_ty_lowering: fix anon const type recovery)
 - #161443 (add internal DSL for testing binders)
 - #161617 (Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`)
 - #161726 (Fix debugger visualizer tuple child ordering w/ PDB debug info)
 - #161729 (miri subtree update)
 - #161745 (make trivial ABI check resilient against new repr)
 - #160871 (Remove `#[rustc_reservation_impl]`)
 - #161180 (Detect missing binding available: add a MaybeIncorrect suggestion)
 - #161522 (test `f16::mul_add` not double-rounding the result)
 - #161631 (Add two comments relating to new-solver performance)
 - #161724 (Add codegen test for static table search loop unrolling)
 - #161740 (do not compress debuginfo for Cygwin)
 - #161750 (vector ABI check: reword so it makes more sense for non-obviously-vector types)
@rust-bors
rust-bors Bot merged commit a725c3e into rust-lang:main Aug 25, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants