]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #106854 - steffahn:drop_linear_arc_rebased, r=Mark-Simulacrum
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Mon, 23 Jan 2023 06:22:04 +0000 (11:52 +0530)
committerGitHub <noreply@github.com>
Mon, 23 Jan 2023 06:22:04 +0000 (11:52 +0530)
commit28081a6aa6a13199e6ee3c09ab544139eb23a3fa
tree5a7408ed472ff3e8de6d2446862eb0157609d795
parent3d4c3125bebdcc8a4cc6de2a9925c7259fde2b63
parent33696fa9cab5bec947147d65833233b957b5edd5
Rollup merge of #106854 - steffahn:drop_linear_arc_rebased, r=Mark-Simulacrum

Add `Arc::into_inner` for safely discarding `Arc`s without calling the destructor on the inner type.

ACP: rust-lang/libs-team#162

Reviving #79665.

I want to get this merged this time; this does not contain changes (apart from very minor changes in comments/docs).

See #79665 for further description of the PR. The only “unresolved” points that led to that PR being closed, AFAICT, were

* The desire to also implement a `Rc::into_inner` function
  * however, this can very well also happen as a subsequent PR
* Possible need for further discussion on the naming “`into_inner`” (?)
  * `into_inner` seems fine to me; also, this PR introduces unstable API, and names can be changed later, too
* ~~I don't know if a tracking issue for the feature flag is supposed to be opened before or after this PR gets merged (if *before*, then I can add the issue number to the `#[unstable…]` attribute)~~ There is a [tracking issue](https://github.com/rust-lang/rust/issues/106894) now.

I say “unresolved” in quotation marks because from my point of view, if reviewers agree, the PR can be merged immediately and as-is :-)
library/alloc/src/sync.rs