Skip to content

Commit

Permalink
Rollup merge of rust-lang#60678 - DutchGhost:master, r=scottmcm
Browse files Browse the repository at this point in the history
Stabilize vecdeque_rotate

This PR stabilizes the vecdeque_rotate feature.
r? @scottmcm

Closes rust-lang#56686
  • Loading branch information
Centril authored May 19, 2019
2 parents 7885dfc + 4d03399 commit dc7cbb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/liballoc/collections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1948,8 +1948,6 @@ impl<T> VecDeque<T> {
/// # Examples
///
/// ```
/// #![feature(vecdeque_rotate)]
///
/// use std::collections::VecDeque;
///
/// let mut buf: VecDeque<_> = (0..10).collect();
Expand All @@ -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;
Expand Down Expand Up @@ -1993,8 +1991,6 @@ impl<T> VecDeque<T> {
/// # Examples
///
/// ```
/// #![feature(vecdeque_rotate)]
///
/// use std::collections::VecDeque;
///
/// let mut buf: VecDeque<_> = (0..10).collect();
Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit dc7cbb6

Please sign in to comment.