Commit 8ef4a25
committed
Auto merge of #141348 - EFanZh:zero-cost-rc-deref, r=<try>
Make `Rc<T>::deref` zero-cost
This PR makes `Rc::deref` zero-cost by changing the internal pointer so that it points to the value directly instead of the allocation.
This is split out from #132553, which will also make `Arc::deref` zero-cost.File tree
17 files changed
+3116
-1180
lines changed- library/alloc/src
- raw_rc
- src
- etc
- natvis
- tools/miri/tests/fail
- tests
- codegen
- debuginfo
17 files changed
+3116
-1180
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| |||
Large diffs are not rendered by default.
0 commit comments