Skip to content

Commit 0e27365

Browse files
committed
Add {Arc/Rc}::ptr_eq
1 parent 79ac74f commit 0e27365

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

_posts/2017-04-27-Rust-1.17.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,11 @@ See the [detailed release notes][notes] for more.
168168

169169
#### Library stabilizations
170170

171-
17 new bits of API were stabilized this release:
171+
19 new bits of API were stabilized this release:
172172

173173
* [`Arc::into_raw`] and [`Rc::into_raw`] let you consume an `Arc` or `Rc` and get a raw pointer.
174174
* [`Arc::from_raw`] and [`Rc::from_raw`] let you take that raw pointer and get an `Arc` or `Rc`.
175+
* [`Arc::ptr_eq`] and [`Rc::ptr_eq`] return true if the two `Arc`s or two `Rc`s point to the same value (not just values that compare as equal).
175176
* [`Ordering::then`] lets you chain two `Ordering`s together, and [`Ordering::then_with`] lets you do it with a function.
176177
* [`BTreeMap::range`] allows you to iterate over a portion of a `BTreeMap`, and [`BTreeMap::range_mut`] lets you do it mutably. [`collections::Bound`] can give you even more control.
177178
* [`process::abort`] will completely terminate a process in an abnormal fashion.
@@ -184,6 +185,7 @@ See the [detailed release notes][notes] for more.
184185

185186
[`Arc::from_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.from_raw
186187
[`Arc::into_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.into_raw
188+
[`Arc::ptr_eq`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.ptr_eq
187189
[`BTreeMap::range_mut`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range_mut
188190
[`BTreeMap::range`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range
189191
[`Cell::into_inner`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.into_inner
@@ -194,6 +196,7 @@ See the [detailed release notes][notes] for more.
194196
[`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
195197
[`Rc::from_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.from_raw
196198
[`Rc::into_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.into_raw
199+
[`Rc::ptr_eq`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.ptr_eq
197200
[`Result::expect_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.expect_err
198201
[`collections::Bound`]: https://doc.rust-lang.org/std/collections/enum.Bound.html
199202
[`process::abort`]: https://doc.rust-lang.org/std/process/fn.abort.html

0 commit comments

Comments
 (0)