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/libcore/cell.rs | |
| parent | 1fca1ab0e7be574022b2d229f0a6ad9bd580d1bf (diff) | |
| download | rust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.tar.gz rust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.zip | |
Documentation of what does for each type
Diffstat (limited to 'src/libcore/cell.rs')
| -rw-r--r-- | src/libcore/cell.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index f0710a1d935..51221f1b9b9 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -317,6 +317,7 @@ impl<T:Copy> Clone for Cell<T> { #[stable(feature = "rust1", since = "1.0.0")] impl<T:Default + Copy> Default for Cell<T> { + /// Creates a `Cell<T>`, with the `Default` value for T. #[inline] fn default() -> Cell<T> { Cell::new(Default::default()) @@ -758,6 +759,7 @@ impl<T: Clone> Clone for RefCell<T> { #[stable(feature = "rust1", since = "1.0.0")] impl<T:Default> Default for RefCell<T> { + /// Creates a `RefCell<T>`, with the `Default` value for T. #[inline] fn default() -> RefCell<T> { RefCell::new(Default::default()) @@ -1139,6 +1141,7 @@ impl<T: ?Sized> UnsafeCell<T> { #[stable(feature = "unsafe_cell_default", since = "1.9.0")] impl<T: Default> Default for UnsafeCell<T> { + /// Creates an `UnsafeCell`, with the `Default` value for T. fn default() -> UnsafeCell<T> { UnsafeCell::new(Default::default()) } |
