about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorathulappadan <a4athulappadan@gmail.com>2016-09-11 17:00:09 +0530
committerathulappadan <a4athulappadan@gmail.com>2016-09-11 17:00:09 +0530
commit49e77dbf25ed6526fb5d37c32e55797fb04522f0 (patch)
treec876b159c4833fe3a5f2c91dadb2194d77bfc057 /src/libcollections
parent1fca1ab0e7be574022b2d229f0a6ad9bd580d1bf (diff)
downloadrust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.tar.gz
rust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.zip
Documentation of what does for each type
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/binary_heap.rs1
-rw-r--r--src/libcollections/borrow.rs1
-rw-r--r--src/libcollections/btree/map.rs1
-rw-r--r--src/libcollections/btree/set.rs1
-rw-r--r--src/libcollections/linked_list.rs1
-rw-r--r--src/libcollections/string.rs1
-rw-r--r--src/libcollections/vec.rs1
-rw-r--r--src/libcollections/vec_deque.rs1
8 files changed, 8 insertions, 0 deletions
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs
index 0b923468c74..1fe921543bd 100644
--- a/src/libcollections/binary_heap.rs
+++ b/src/libcollections/binary_heap.rs
@@ -263,6 +263,7 @@ impl<T: Clone> Clone for BinaryHeap<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Ord> Default for BinaryHeap<T> {
+    /// Creates an empty `BinaryHeap<T>`.
     #[inline]
     fn default() -> BinaryHeap<T> {
         BinaryHeap::new()
diff --git a/src/libcollections/borrow.rs b/src/libcollections/borrow.rs
index 3ad1d082985..ef136f3356a 100644
--- a/src/libcollections/borrow.rs
+++ b/src/libcollections/borrow.rs
@@ -249,6 +249,7 @@ impl<'a, B: ?Sized> Default for Cow<'a, B>
     where B: ToOwned,
           <B as ToOwned>::Owned: Default
 {
+    /// Creates a `Cow<'a, B>` pointer.
     fn default() -> Cow<'a, B> {
         Owned(<B as ToOwned>::Owned::default())
     }
diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs
index 624083a8eaf..36cb5a1fd9f 100644
--- a/src/libcollections/btree/map.rs
+++ b/src/libcollections/btree/map.rs
@@ -1667,6 +1667,7 @@ impl<K: Hash, V: Hash> Hash for BTreeMap<K, V> {
 }
 
 impl<K: Ord, V> Default for BTreeMap<K, V> {
+    /// Creates an empty `BTreeMap<K, V>`.
     fn default() -> BTreeMap<K, V> {
         BTreeMap::new()
     }
diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs
index 5d7b00f57c8..24da81c3e93 100644
--- a/src/libcollections/btree/set.rs
+++ b/src/libcollections/btree/set.rs
@@ -674,6 +674,7 @@ impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BTreeSet<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Ord> Default for BTreeSet<T> {
+    /// Creates a new `BTreeSet<T>`.
     fn default() -> BTreeSet<T> {
         BTreeSet::new()
     }
diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs
index 769c5162a45..690c4f4af35 100644
--- a/src/libcollections/linked_list.rs
+++ b/src/libcollections/linked_list.rs
@@ -164,6 +164,7 @@ impl<T> LinkedList<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for LinkedList<T> {
+    /// Creates an empty `LinkedList<T>`.
     #[inline]
     fn default() -> Self {
         Self::new()
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index 3a304c62929..773e94f1b41 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -1567,6 +1567,7 @@ impl_eq! { Cow<'a, str>, String }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Default for String {
+    /// Creates an empty `String`.
     #[inline]
     fn default() -> String {
         String::new()
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 876314613f5..cb1d0de6e5e 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1610,6 +1610,7 @@ impl<T> Drop for Vec<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for Vec<T> {
+    /// Creates an empty `Vec<T>`.
     fn default() -> Vec<T> {
         Vec::new()
     }
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index 96624f121b2..efee4914a11 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -84,6 +84,7 @@ impl<T> Drop for VecDeque<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for VecDeque<T> {
+    /// Creates a `VecDeque<T>` with a constant initial capacity.
     #[inline]
     fn default() -> VecDeque<T> {
         VecDeque::new()