diff options
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/collections/vec_deque.rs | 10 | ||||
| -rw-r--r-- | src/liballoc/lib.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/str.rs | 1 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 8a3950718d7..207359ed696 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -911,7 +911,7 @@ impl<G: ?Sized + Generator> Generator for Pin<Box<G>> { } } -#[unstable(feature = "futures_api", issue = "50547")] +#[stable(feature = "futures_api", since = "1.36.0")] impl<F: ?Sized + Future + Unpin> Future for Box<F> { type Output = F::Output; diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index d806bd0b1d7..d65c24f7350 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! A double-ended queue implemented with a growable ring buffer. //! //! This queue has `O(1)` amortized inserts and removals from both ends of the @@ -367,7 +369,7 @@ impl<T> VecDeque<T> { VecDeque::with_capacity(INITIAL_CAPACITY) } - /// Creates an empty `VecDeque` with space for at least `n` elements. + /// Creates an empty `VecDeque` with space for at least `capacity` elements. /// /// # Examples /// @@ -377,10 +379,10 @@ impl<T> VecDeque<T> { /// let vector: VecDeque<u32> = VecDeque::with_capacity(10); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn with_capacity(n: usize) -> VecDeque<T> { + pub fn with_capacity(capacity: usize) -> VecDeque<T> { // +1 since the ringbuffer always leaves one space empty - let cap = cmp::max(n + 1, MINIMUM_CAPACITY + 1).next_power_of_two(); - assert!(cap > n, "capacity overflow"); + let cap = cmp::max(capacity + 1, MINIMUM_CAPACITY + 1).next_power_of_two(); + assert!(cap > capacity, "capacity overflow"); VecDeque { tail: 0, diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 63b3fbbdaef..eb673488170 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -85,7 +85,6 @@ #![feature(fmt_internals)] #![feature(fn_traits)] #![feature(fundamental)] -#![feature(futures_api)] #![feature(lang_items)] #![feature(libc)] #![feature(needs_allocator)] diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index f10a01d44c8..e5d4e1c533c 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -573,4 +573,3 @@ impl str { pub unsafe fn from_boxed_utf8_unchecked(v: Box<[u8]>) -> Box<str> { Box::from_raw(Box::into_raw(v) as *mut str) } - |
