-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Relax allocator requirements on some Rc/Arc APIs. #124981
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Remove A: Clone bound from Rc::assume_init, Rc::downcast, and Rc::downcast_unchecked. * Make From<Rc<[T; N]>> for Rc<[T]> allocator-aware. Internal changes: * Made Arc::internal_into_inner_with_allocator method into Arc::into_inner_with_allocator associated fn. * Add private Rc::into_inner_with_allocator (to match Arc), so other fns don't have to juggle ManuallyDrop.
rustbot has assigned @Mark-Simulacrum. Use |
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
May 10, 2024
zachs18
changed the title
Relax allocator requirements on some Rc APIs.
Relax allocator requirements on some Rc/Arc APIs.
May 10, 2024
This comment has been minimized.
This comment has been minimized.
zachs18
force-pushed
the
rc-allocator-generalize-1
branch
from
May 10, 2024 19:34
06beef4
to
8d8eb50
Compare
@bors r+ rollup |
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 11, 2024
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
May 11, 2024
… r=Mark-Simulacrum Relax allocator requirements on some Rc/Arc APIs. Split out from rust-lang#119761 * Remove `A: Clone` bound from `Rc::assume_init`(s), `Rc::downcast`, and `Rc::downcast_unchecked` (`Arc` methods were already relaxed by rust-lang#120445) * Make `From<Rc<[T; N]>> for Rc<[T]>` allocator-aware (`Arc`'s already is). * Remove `A: Clone` from `Rc/Arc::unwrap_or_clone` Internal changes: * Made `Arc::internal_into_inner_with_allocator` method into `Arc::into_inner_with_allocator` associated fn. * Add private `Rc::into_inner_with_allocator` (to match Arc), so other fns don't have to juggle `ManuallyDrop`.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
May 11, 2024
… r=Mark-Simulacrum Relax allocator requirements on some Rc/Arc APIs. Split out from rust-lang#119761 * Remove `A: Clone` bound from `Rc::assume_init`(s), `Rc::downcast`, and `Rc::downcast_unchecked` (`Arc` methods were already relaxed by rust-lang#120445) * Make `From<Rc<[T; N]>> for Rc<[T]>` allocator-aware (`Arc`'s already is). * Remove `A: Clone` from `Rc/Arc::unwrap_or_clone` Internal changes: * Made `Arc::internal_into_inner_with_allocator` method into `Arc::into_inner_with_allocator` associated fn. * Add private `Rc::into_inner_with_allocator` (to match Arc), so other fns don't have to juggle `ManuallyDrop`.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 11, 2024
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#124807 (Migrate `run-make/rustdoc-io-error` to `rmake.rs`) - rust-lang#124829 (Enable profiler for armv7-unknown-linux-gnueabihf.) - rust-lang#124939 (Always hide private fields in aliased type) - rust-lang#124963 (Migrate `run-make/rustdoc-shared-flags` to rmake) - rust-lang#124981 (Relax allocator requirements on some Rc/Arc APIs.) - rust-lang#125008 (Add test for rust-lang#122775) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 11, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#124096 (Clean up users of rust_dbg_call) - rust-lang#124829 (Enable profiler for armv7-unknown-linux-gnueabihf.) - rust-lang#124939 (Always hide private fields in aliased type) - rust-lang#124963 (Migrate `run-make/rustdoc-shared-flags` to rmake) - rust-lang#124981 (Relax allocator requirements on some Rc/Arc APIs.) - rust-lang#125008 (Add test for rust-lang#122775) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 12, 2024
Rollup merge of rust-lang#124981 - zachs18:rc-allocator-generalize-1, r=Mark-Simulacrum Relax allocator requirements on some Rc/Arc APIs. Split out from rust-lang#119761 * Remove `A: Clone` bound from `Rc::assume_init`(s), `Rc::downcast`, and `Rc::downcast_unchecked` (`Arc` methods were already relaxed by rust-lang#120445) * Make `From<Rc<[T; N]>> for Rc<[T]>` allocator-aware (`Arc`'s already is). * Remove `A: Clone` from `Rc/Arc::unwrap_or_clone` Internal changes: * Made `Arc::internal_into_inner_with_allocator` method into `Arc::into_inner_with_allocator` associated fn. * Add private `Rc::into_inner_with_allocator` (to match Arc), so other fns don't have to juggle `ManuallyDrop`.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split out from #119761
A: Clone
bound fromRc::assume_init
(s),Rc::downcast
, andRc::downcast_unchecked
(Arc
methods were already relaxed by Fix someArc
allocator leaks #120445)From<Rc<[T; N]>> for Rc<[T]>
allocator-aware (Arc
's already is).A: Clone
fromRc/Arc::unwrap_or_clone
Internal changes:
Arc::internal_into_inner_with_allocator
method intoArc::into_inner_with_allocator
associated fn.Rc::into_inner_with_allocator
(to match Arc), so other fns don't have to juggleManuallyDrop
.