about summary refs log tree commit diff
diff options
context:
space:
mode:
authorathulappadan <a4athulappadan@gmail.com>2016-09-11 22:58:01 +0530
committerathulappadan <a4athulappadan@gmail.com>2016-09-11 22:58:01 +0530
commit41881e85bd832127f2a6eee5821eaae353dea281 (patch)
tree730da8b3d9bd50eec2c578ae76e9eca931942bb5
parent49e77dbf25ed6526fb5d37c32e55797fb04522f0 (diff)
Documentation for default types modified
-rw-r--r--src/liballoc/arc.rs2
-rw-r--r--src/libcollections/borrow.rs2
-rw-r--r--src/libcollections/btree/set.rs2
-rw-r--r--src/libcollections/vec_deque.rs2
-rw-r--r--src/libcore/option.rs2
-rw-r--r--src/libcore/slice.rs4
-rw-r--r--src/libcore/sync/atomic.rs2
-rw-r--r--src/libcoretest/hash/mod.rs2
-rw-r--r--src/librustc/session/config.rs1
-rw-r--r--src/libstd/collections/hash/map.rs2
-rw-r--r--src/libstd/collections/hash/set.rs2
-rw-r--r--src/libstd/ffi/c_str.rs2
-rw-r--r--src/libsyntax/ptr.rs2
13 files changed, 12 insertions, 15 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index a2923091fb5..3d579641b96 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -718,7 +718,7 @@ impl<T: ?Sized> Clone for Weak<T> {
 
 #[stable(feature = "downgraded_weak", since = "1.10.0")]
 impl<T> Default for Weak<T> {
-    /// Creates a new `Weak<T>`.
+    /// Constructs a new `Weak<T>` without an accompanying instance of T.
     fn default() -> Weak<T> {
         Weak::new()
     }
diff --git a/src/libcollections/borrow.rs b/src/libcollections/borrow.rs
index ef136f3356a..700f88dc0f2 100644
--- a/src/libcollections/borrow.rs
+++ b/src/libcollections/borrow.rs
@@ -249,7 +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.
+    /// Creates an owned Cow<'a, B> with the default value for the contained owned value.
     fn default() -> Cow<'a, B> {
         Owned(<B as ToOwned>::Owned::default())
     }
diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs
index 24da81c3e93..49da3aa480c 100644
--- a/src/libcollections/btree/set.rs
+++ b/src/libcollections/btree/set.rs
@@ -674,7 +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>`.
+    /// Makes a empty `BTreeSet<T>` with a reasonable choice of B.
     fn default() -> BTreeSet<T> {
         BTreeSet::new()
     }
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index efee4914a11..2e561dabb47 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -84,7 +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.
+    /// Creates an empty `VecDeque<T>`.
     #[inline]
     fn default() -> VecDeque<T> {
         VecDeque::new()
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 4c449c6562e..7733b90ec01 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -698,7 +698,7 @@ fn expect_failed(msg: &str) -> ! {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for Option<T> {
-    /// Creates an instance of None.
+    /// Returns None.
     #[inline]
     fn default() -> Option<T> { None }
 }
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index 53d2b3ded67..7b147faccd2 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -755,13 +755,13 @@ impl<T> ops::IndexMut<ops::RangeToInclusive<usize>> for [T] {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T> Default for &'a [T] {
-    /// Creates an empty Slice.
+    /// Creates an empty slice.
     fn default() -> &'a [T] { &[] }
 }
 
 #[stable(feature = "mut_slice_default", since = "1.5.0")]
 impl<'a, T> Default for &'a mut [T] {
-    /// Creates a mutable empty Slice.
+    /// Creates a mutable empty slice.
     fn default() -> &'a mut [T] { &mut [] }
 }
 
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
index a5efda702df..f5f37be52de 100644
--- a/src/libcore/sync/atomic.rs
+++ b/src/libcore/sync/atomic.rs
@@ -118,7 +118,7 @@ pub struct AtomicPtr<T> {
 #[cfg(target_has_atomic = "ptr")]
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for AtomicPtr<T> {
-    /// Creates an `AtomicPtr<T>` with an initial mutable null pointer.
+    /// Creates a null `AtomicPtr<T>`.
     fn default() -> AtomicPtr<T> {
         AtomicPtr::new(::ptr::null_mut())
     }
diff --git a/src/libcoretest/hash/mod.rs b/src/libcoretest/hash/mod.rs
index dec8b57518f..4ea42644ecd 100644
--- a/src/libcoretest/hash/mod.rs
+++ b/src/libcoretest/hash/mod.rs
@@ -18,7 +18,6 @@ struct MyHasher {
 }
 
 impl Default for MyHasher {
-    /// Constructs a `MyHasher` with initial value zero.
     fn default() -> MyHasher {
         MyHasher { hash: 0 }
     }
@@ -91,7 +90,6 @@ impl Hasher for CustomHasher {
 }
 
 impl Default for CustomHasher {
-    /// Constructs a `CustomHasher` with initial value zero.
     fn default() -> CustomHasher {
         CustomHasher { output: 0 }
     }
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 5708f961ada..2009e18f6ee 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -84,7 +84,6 @@ pub enum ErrorOutputType {
 }
 
 impl Default for ErrorOutputType {
-    /// Creates an `HumanReadble`, initialised with `ColorConfig` enum type `Auto`.
     fn default() -> ErrorOutputType {
         ErrorOutputType::HumanReadable(ColorConfig::Auto)
     }
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 48c54c16ed8..eb1653f18cb 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -1218,7 +1218,7 @@ impl<K, V, S> Default for HashMap<K, V, S>
     where K: Eq + Hash,
           S: BuildHasher + Default,
 {
-    /// Creates a `HashMap<K, V, S>`, with initial `Default` hasher.
+    /// Creates an empty `HashMap<K, V, S>`, with the `Default` value for the hasher.
     fn default() -> HashMap<K, V, S> {
         HashMap::with_hasher(Default::default())
     }
diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs
index b5652bcabf1..ff56747fee6 100644
--- a/src/libstd/collections/hash/set.rs
+++ b/src/libstd/collections/hash/set.rs
@@ -665,7 +665,7 @@ impl<T, S> Default for HashSet<T, S>
     where T: Eq + Hash,
           S: BuildHasher + Default,
 {
-    /// Creates a `HashSet<T, S>` with initial `Default` hasher.
+    /// Creates an empty `HashSet<T, S>` with the `Default` value for the hasher.
     fn default() -> HashSet<T, S> {
         HashSet::with_hasher(Default::default())
     }
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index 044112ea136..0f7dc3889f0 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -339,7 +339,7 @@ impl<'a> Default for &'a CStr {
 
 #[stable(feature = "cstr_default", since = "1.10.0")]
 impl Default for CString {
-    /// Creates a new `CString`, by calling the `Default` of `CStr`, and then owns it.
+    /// Creates an empty `CString`.
     fn default() -> CString {
         let a: &CStr = Default::default();
         a.to_owned()
diff --git a/src/libsyntax/ptr.rs b/src/libsyntax/ptr.rs
index a65c54ac1e2..58750158931 100644
--- a/src/libsyntax/ptr.rs
+++ b/src/libsyntax/ptr.rs
@@ -154,7 +154,7 @@ impl<T> P<[T]> {
 }
 
 impl<T> Default for P<[T]> {
-    /// Creates a new `P`, with the `Default` value for T.
+    /// Creates an empty `P<[T]>`.
     fn default() -> P<[T]> {
         P::new()
     }