Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 711b97b

Browse files
committed
Auto merge of rust-lang#133061 - scottmcm:dedup-rc, r=<try>
[DRAFT] `Rc`: allow deduping both `deref` and `clone` across types This works by *always* putting the counts *just* before the value, rather than using an `RcInner` type at all. By doing that, the offset to the counts are exactly the same for all types -- small or large, low alignment or high -- so `Rc::clone` can be polymorphized, and `Rc::deref` is always just a no-op. r? ghost
2 parents 917a50a + 97b8832 commit 711b97b

File tree

8 files changed

+1062
-650
lines changed

8 files changed

+1062
-650
lines changed

library/alloc/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,12 @@
104104
#![feature(async_closure)]
105105
#![feature(async_fn_traits)]
106106
#![feature(async_iterator)]
107+
#![feature(box_as_ptr)]
107108
#![feature(box_uninit_write)]
108109
#![feature(clone_to_uninit)]
109110
#![feature(coerce_unsized)]
110111
#![feature(const_align_of_val)]
112+
#![feature(const_alloc_layout)]
111113
#![feature(const_box)]
112114
#![feature(const_eval_select)]
113115
#![feature(const_heap)]

0 commit comments

Comments
 (0)