Skip to content

Commit f0c5e8b

Browse files
committed
Privatize Rc::is_unique
[unstable, deprecated since 1.15.0]
1 parent f4aaae9 commit f0c5e8b

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

src/doc/unstable-book/src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
- [io_error_internals](library-features/io-error-internals.md)
156156
- [io](library-features/io.md)
157157
- [ip](library-features/ip.md)
158-
- [is_unique](library-features/is-unique.md)
159158
- [iter_rfind](library-features/iter-rfind.md)
160159
- [libstd_io_internals](library-features/libstd-io-internals.md)
161160
- [libstd_sys_internals](library-features/libstd-sys-internals.md)

src/doc/unstable-book/src/library-features/is-unique.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/liballoc/rc.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,11 +488,7 @@ impl<T: ?Sized> Rc<T> {
488488
///
489489
/// [weak]: struct.Weak.html
490490
#[inline]
491-
#[unstable(feature = "is_unique", reason = "uniqueness has unclear meaning",
492-
issue = "28356")]
493-
#[rustc_deprecated(since = "1.15.0",
494-
reason = "too niche; use `strong_count` and `weak_count` instead")]
495-
pub fn is_unique(this: &Self) -> bool {
491+
fn is_unique(this: &Self) -> bool {
496492
Rc::weak_count(this) == 0 && Rc::strong_count(this) == 1
497493
}
498494

0 commit comments

Comments
 (0)