Rollup merge of #60678 - DutchGhost:master, r=scottmcm
Stabilize vecdeque_rotate This PR stabilizes the vecdeque_rotate feature. r? @scottmcm Closes https://github.com/rust-lang/rust/issues/56686
This commit is contained in:
commit
dc7cbb697b
@ -1948,8 +1948,6 @@ impl<T> VecDeque<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(vecdeque_rotate)]
|
||||
///
|
||||
/// use std::collections::VecDeque;
|
||||
///
|
||||
/// let mut buf: VecDeque<_> = (0..10).collect();
|
||||
@ -1963,7 +1961,7 @@ impl<T> VecDeque<T> {
|
||||
/// }
|
||||
/// assert_eq!(buf, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
||||
/// ```
|
||||
#[unstable(feature = "vecdeque_rotate", issue = "56686")]
|
||||
#[stable(feature = "vecdeque_rotate", since = "1.36.0")]
|
||||
pub fn rotate_left(&mut self, mid: usize) {
|
||||
assert!(mid <= self.len());
|
||||
let k = self.len() - mid;
|
||||
@ -1993,8 +1991,6 @@ impl<T> VecDeque<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(vecdeque_rotate)]
|
||||
///
|
||||
/// use std::collections::VecDeque;
|
||||
///
|
||||
/// let mut buf: VecDeque<_> = (0..10).collect();
|
||||
@ -2008,7 +2004,7 @@ impl<T> VecDeque<T> {
|
||||
/// }
|
||||
/// assert_eq!(buf, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
||||
/// ```
|
||||
#[unstable(feature = "vecdeque_rotate", issue = "56686")]
|
||||
#[stable(feature = "vecdeque_rotate", since = "1.36.0")]
|
||||
pub fn rotate_right(&mut self, k: usize) {
|
||||
assert!(k <= self.len());
|
||||
let mid = self.len() - k;
|
||||
|
@ -6,7 +6,6 @@
|
||||
#![feature(repeat_generic_slice)]
|
||||
#![feature(try_reserve)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(vecdeque_rotate)]
|
||||
#![deny(rust_2018_idioms)]
|
||||
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
Loading…
Reference in New Issue
Block a user