diff options
| author | athulappadan <a4athulappadan@gmail.com> | 2016-09-11 17:00:09 +0530 |
|---|---|---|
| committer | athulappadan <a4athulappadan@gmail.com> | 2016-09-11 17:00:09 +0530 |
| commit | 49e77dbf25ed6526fb5d37c32e55797fb04522f0 (patch) | |
| tree | c876b159c4833fe3a5f2c91dadb2194d77bfc057 /src/liballoc | |
| parent | 1fca1ab0e7be574022b2d229f0a6ad9bd580d1bf (diff) | |
| download | rust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.tar.gz rust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.zip | |
Documentation of what does for each type
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/boxed.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index b54b71cabd1..a2923091fb5 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -718,6 +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>`. fn default() -> Weak<T> { Weak::new() } @@ -923,6 +924,7 @@ impl<T: ?Sized> fmt::Pointer for Arc<T> { #[stable(feature = "rust1", since = "1.0.0")] impl<T: Default> Default for Arc<T> { + /// Creates a new `Arc<T>`, with the `Default` value for T. fn default() -> Arc<T> { Arc::new(Default::default()) } diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 70c429cc360..bc9b6e805ef 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -290,6 +290,7 @@ impl<T: ?Sized> Box<T> { #[stable(feature = "rust1", since = "1.0.0")] impl<T: Default> Default for Box<T> { + /// Creates a `Box<T>`, with the `Default` value for T. fn default() -> Box<T> { box Default::default() } diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index c24c7ca47ad..dadddbc2cb3 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -870,6 +870,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> { #[stable(feature = "downgraded_weak", since = "1.10.0")] impl<T> Default for Weak<T> { + /// Creates a new `Weak<T>`. fn default() -> Weak<T> { Weak::new() } |
