about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-16 21:36:23 +0000
committerbors <bors@rust-lang.org>2020-04-16 21:36:23 +0000
commit868b51be6f29d5b43d37c5d65bac1482d3a50ad8 (patch)
treee4330f6772caec6661b8229b5f88eca7b988138b /src/liballoc
parent7f3df5772439eee1c512ed2eb540beef1124d236 (diff)
parentf51d2d07ec5752eb0bbd17fc2172354b434040b1 (diff)
downloadrust-868b51be6f29d5b43d37c5d65bac1482d3a50ad8.tar.gz
rust-868b51be6f29d5b43d37c5d65bac1482d3a50ad8.zip
Auto merge of #71223 - Dylan-DPC:rollup-z5itu39, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #70611 (Add long error explanation for E0708 #61137)
 - #71197 (Don't use the HirId to NodeId map in MIR)
 - #71211 (Update cargo)
 - #71219 (Minor fixes to doc comments of 'VecDeque')
 - #71221 (Dogfood or_patterns in rustdoc)

Failed merges:

r? @ghost
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/vec_deque.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs
index 0ed9773630e..06e00465e12 100644
--- a/src/liballoc/collections/vec_deque.rs
+++ b/src/liballoc/collections/vec_deque.rs
@@ -488,7 +488,7 @@ impl<T> VecDeque<T> {
         VecDeque { tail: 0, head: 0, buf: RawVec::with_capacity(cap) }
     }
 
-    /// Retrieves an element in the `VecDeque` by index.
+    /// Provides a reference to the element at the given index.
     ///
     /// Element at index 0 is the front of the queue.
     ///
@@ -513,7 +513,7 @@ impl<T> VecDeque<T> {
         }
     }
 
-    /// Retrieves an element in the `VecDeque` mutably by index.
+    /// Provides a mutable reference to the element at the given index.
     ///
     /// Element at index 0 is the front of the queue.
     ///
@@ -651,7 +651,7 @@ impl<T> VecDeque<T> {
         }
     }
 
-    /// Tries to reserves the minimum capacity for exactly `additional` more elements to
+    /// Tries to reserve the minimum capacity for exactly `additional` more elements to
     /// be inserted in the given `VecDeque<T>`. After calling `reserve_exact`,
     /// capacity will be greater than or equal to `self.len() + additional`.
     /// Does nothing if the capacity is already sufficient.
@@ -662,7 +662,7 @@ impl<T> VecDeque<T> {
     ///
     /// # Errors
     ///
-    /// If the capacity overflows, or the allocator reports a failure, then an error
+    /// If the capacity overflows `usize`, or the allocator reports a failure, then an error
     /// is returned.
     ///
     /// # Examples
@@ -678,7 +678,7 @@ impl<T> VecDeque<T> {
     ///     // Pre-reserve the memory, exiting if we can't
     ///     output.try_reserve_exact(data.len())?;
     ///
-    ///     // Now we know this can't OOM in the middle of our complex work
+    ///     // Now we know this can't OOM(Out-Of-Memory) in the middle of our complex work
     ///     output.extend(data.iter().map(|&val| {
     ///         val * 2 + 5 // very complicated
     ///     }));
@@ -700,7 +700,7 @@ impl<T> VecDeque<T> {
     ///
     /// # Errors
     ///
-    /// If the capacity overflows, or the allocator reports a failure, then an error
+    /// If the capacity overflows `usize`, or the allocator reports a failure, then an error
     /// is returned.
     ///
     /// # Examples