Skip to content

Commit a941244

Browse files
committed
Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichton
Remove items that are unstable and deprecated This removes unstable items that have been deprecated for more than one cycle. - Since 1.16.0, `#![feature(enumset)]` - All of `mod collections::enum_set` - Since 1.15.0, `#![feature(borrow_state)]` - `cell::BorrowState` - `RefCell::borrow_state()` - Since 1.15.0, `#![feature(is_unique)]` - `Rc::is_unique()` (made private like `Arc::is_unique()`) - Since 1.15.0, `#![feature(rc_would_unwrap)]` - `Rc::would_wrap()` - Since 1.13.0, `#![feature(binary_heap_extras)]` - `BinaryHeap::push_pop()` - `BinaryHeap::replace()` - Since 1.12.0, `#![feature(as_unsafe_cell)]` - `Cell::as_unsafe_cell()` - `RefCell::as_unsafe_cell()` - Since 1.12.0, `#![feature(map_entry_recover_keys)]` - `btree_map::OccupiedEntry::remove_pair()` - `hash_map::OccupiedEntry::remove_pair()` - Since 1.11.0, `#![feature(float_extras)]` - `Float::nan()` - `Float::infinity()` - `Float::neg_infinity()` - `Float::neg_zero()` - `Float::zero()` - `Float::one()` - `Float::integer_decode()` - `f32::integer_decode()` - `f32::ldexp()` - `f32::frexp()` - `f32::next_after()` - `f64::integer_decode()` - `f64::ldexp()` - `f64::frexp()` - `f64::next_after()` - Since 1.11.0, `#![feature(zero_one)]` - `num::Zero` - `num::One`
2 parents 252d3da + 13d2534 commit a941244

34 files changed

+103
-1284
lines changed

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

-10
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,8 @@
102102
- [alloc_system](library-features/alloc-system.md)
103103
- [alloc](library-features/alloc.md)
104104
- [as_c_str](library-features/as-c-str.md)
105-
- [as_unsafe_cell](library-features/as-unsafe-cell.md)
106105
- [ascii_ctype](library-features/ascii-ctype.md)
107-
- [binary_heap_extras](library-features/binary-heap-extras.md)
108106
- [binary_heap_peek_mut_pop](library-features/binary-heap-peek-mut-pop.md)
109-
- [borrow_state](library-features/borrow-state.md)
110107
- [box_heap](library-features/box-heap.md)
111108
- [c_void_variant](library-features/c-void-variant.md)
112109
- [char_escape_debug](library-features/char-escape-debug.md)
@@ -131,14 +128,12 @@
131128
- [derive_clone_copy](library-features/derive-clone-copy.md)
132129
- [derive_eq](library-features/derive-eq.md)
133130
- [discriminant_value](library-features/discriminant-value.md)
134-
- [enumset](library-features/enumset.md)
135131
- [error_type_id](library-features/error-type-id.md)
136132
- [exact_size_is_empty](library-features/exact-size-is-empty.md)
137133
- [fd](library-features/fd.md)
138134
- [fd_read](library-features/fd-read.md)
139135
- [fixed_size_array](library-features/fixed-size-array.md)
140136
- [float_bits_conv](library-features/float-bits-conv.md)
141-
- [float_extras](library-features/float-extras.md)
142137
- [flt2dec](library-features/flt2dec.md)
143138
- [fmt_flags_align](library-features/fmt-flags-align.md)
144139
- [fmt_internals](library-features/fmt-internals.md)
@@ -158,15 +153,13 @@
158153
- [io_error_internals](library-features/io-error-internals.md)
159154
- [io](library-features/io.md)
160155
- [ip](library-features/ip.md)
161-
- [is_unique](library-features/is-unique.md)
162156
- [iter_rfind](library-features/iter-rfind.md)
163157
- [libstd_io_internals](library-features/libstd-io-internals.md)
164158
- [libstd_sys_internals](library-features/libstd-sys-internals.md)
165159
- [libstd_thread_internals](library-features/libstd-thread-internals.md)
166160
- [linked_list_extras](library-features/linked-list-extras.md)
167161
- [lookup_host](library-features/lookup-host.md)
168162
- [manually_drop](library-features/manually-drop.md)
169-
- [map_entry_recover_keys](library-features/map-entry-recover-keys.md)
170163
- [mpsc_select](library-features/mpsc-select.md)
171164
- [n16](library-features/n16.md)
172165
- [never_type_impls](library-features/never-type-impls.md)
@@ -189,7 +182,6 @@
189182
- [rand](library-features/rand.md)
190183
- [range_contains](library-features/range-contains.md)
191184
- [raw](library-features/raw.md)
192-
- [rc_would_unwrap](library-features/rc-would-unwrap.md)
193185
- [retain_hash_collection](library-features/retain-hash-collection.md)
194186
- [reverse_cmp_key](library-features/reverse-cmp-key.md)
195187
- [rt](library-features/rt.md)
@@ -225,5 +217,3 @@
225217
- [windows_handle](library-features/windows-handle.md)
226218
- [windows_net](library-features/windows-net.md)
227219
- [windows_stdio](library-features/windows-stdio.md)
228-
- [zero_one](library-features/zero-one.md)
229-
>>>>>> Add top level sections to the Unstable Book.

src/doc/unstable-book/src/library-features/as-unsafe-cell.md

-7
This file was deleted.

src/doc/unstable-book/src/library-features/binary-heap-extras.md

-7
This file was deleted.

src/doc/unstable-book/src/library-features/borrow-state.md

-7
This file was deleted.

src/doc/unstable-book/src/library-features/enumset.md

-7
This file was deleted.

src/doc/unstable-book/src/library-features/float-extras.md

-7
This file was deleted.

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

-7
This file was deleted.

src/doc/unstable-book/src/library-features/map-entry-recover-keys.md

-5
This file was deleted.

src/doc/unstable-book/src/library-features/rc-would-unwrap.md

-5
This file was deleted.

src/doc/unstable-book/src/library-features/zero-one.md

-7
This file was deleted.

src/liballoc/rc.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,6 @@ impl<T> Rc<T> {
340340
}
341341
}
342342

343-
/// Checks whether [`Rc::try_unwrap`][try_unwrap] would return
344-
/// [`Ok`].
345-
///
346-
/// [try_unwrap]: struct.Rc.html#method.try_unwrap
347-
/// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok
348-
#[unstable(feature = "rc_would_unwrap",
349-
reason = "just added for niche usecase",
350-
issue = "28356")]
351-
#[rustc_deprecated(since = "1.15.0", reason = "too niche; use `strong_count` instead")]
352-
pub fn would_unwrap(this: &Self) -> bool {
353-
Rc::strong_count(&this) == 1
354-
}
355-
356343
/// Consumes the `Rc`, returning the wrapped pointer.
357344
///
358345
/// To avoid a memory leak the pointer must be converted back to an `Rc` using
@@ -532,11 +519,7 @@ impl<T: ?Sized> Rc<T> {
532519
///
533520
/// [weak]: struct.Weak.html
534521
#[inline]
535-
#[unstable(feature = "is_unique", reason = "uniqueness has unclear meaning",
536-
issue = "28356")]
537-
#[rustc_deprecated(since = "1.15.0",
538-
reason = "too niche; use `strong_count` and `weak_count` instead")]
539-
pub fn is_unique(this: &Self) -> bool {
522+
fn is_unique(this: &Self) -> bool {
540523
Rc::weak_count(this) == 0 && Rc::strong_count(this) == 1
541524
}
542525

src/libcollections/binary_heap.rs

-76
Original file line numberDiff line numberDiff line change
@@ -555,82 +555,6 @@ impl<T: Ord> BinaryHeap<T> {
555555
self.sift_up(0, old_len);
556556
}
557557

558-
/// Pushes an item onto the binary heap, then pops the greatest item off the queue in
559-
/// an optimized fashion.
560-
///
561-
/// # Examples
562-
///
563-
/// Basic usage:
564-
///
565-
/// ```
566-
/// #![feature(binary_heap_extras)]
567-
/// #![allow(deprecated)]
568-
///
569-
/// use std::collections::BinaryHeap;
570-
/// let mut heap = BinaryHeap::new();
571-
/// heap.push(1);
572-
/// heap.push(5);
573-
///
574-
/// assert_eq!(heap.push_pop(3), 5);
575-
/// assert_eq!(heap.push_pop(9), 9);
576-
/// assert_eq!(heap.len(), 2);
577-
/// assert_eq!(heap.peek(), Some(&3));
578-
/// ```
579-
#[unstable(feature = "binary_heap_extras",
580-
reason = "needs to be audited",
581-
issue = "28147")]
582-
#[rustc_deprecated(since = "1.13.0", reason = "use `peek_mut` instead")]
583-
pub fn push_pop(&mut self, mut item: T) -> T {
584-
match self.data.get_mut(0) {
585-
None => return item,
586-
Some(top) => {
587-
if *top > item {
588-
swap(&mut item, top);
589-
} else {
590-
return item;
591-
}
592-
}
593-
}
594-
595-
self.sift_down(0);
596-
item
597-
}
598-
599-
/// Pops the greatest item off the binary heap, then pushes an item onto the queue in
600-
/// an optimized fashion. The push is done regardless of whether the binary heap
601-
/// was empty.
602-
///
603-
/// # Examples
604-
///
605-
/// Basic usage:
606-
///
607-
/// ```
608-
/// #![feature(binary_heap_extras)]
609-
/// #![allow(deprecated)]
610-
///
611-
/// use std::collections::BinaryHeap;
612-
/// let mut heap = BinaryHeap::new();
613-
///
614-
/// assert_eq!(heap.replace(1), None);
615-
/// assert_eq!(heap.replace(3), Some(1));
616-
/// assert_eq!(heap.len(), 1);
617-
/// assert_eq!(heap.peek(), Some(&3));
618-
/// ```
619-
#[unstable(feature = "binary_heap_extras",
620-
reason = "needs to be audited",
621-
issue = "28147")]
622-
#[rustc_deprecated(since = "1.13.0", reason = "use `peek_mut` instead")]
623-
pub fn replace(&mut self, mut item: T) -> Option<T> {
624-
if !self.is_empty() {
625-
swap(&mut item, &mut self.data[0]);
626-
self.sift_down(0);
627-
Some(item)
628-
} else {
629-
self.push(item);
630-
None
631-
}
632-
}
633-
634558
/// Consumes the `BinaryHeap` and returns the underlying vector
635559
/// in arbitrary order.
636560
///

src/libcollections/btree/map.rs

-7
Original file line numberDiff line numberDiff line change
@@ -2217,13 +2217,6 @@ impl<'a, K: Ord, V> OccupiedEntry<'a, K, V> {
22172217
self.handle.reborrow().into_kv().0
22182218
}
22192219

2220-
/// Deprecated, renamed to `remove_entry`
2221-
#[unstable(feature = "map_entry_recover_keys", issue = "34285")]
2222-
#[rustc_deprecated(since = "1.12.0", reason = "renamed to `remove_entry`")]
2223-
pub fn remove_pair(self) -> (K, V) {
2224-
self.remove_entry()
2225-
}
2226-
22272220
/// Take ownership of the key and value from the map.
22282221
///
22292222
/// # Examples

0 commit comments

Comments
 (0)