aboutsummaryrefslogtreecommitdiff
path: root/libcore/cell.rs
diff options
context:
space:
mode:
authorpravic <[email protected]>2016-04-29 21:16:15 +0300
committerpravic <[email protected]>2016-04-29 21:16:15 +0300
commit77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000 (patch)
tree710e445d56a1a582b8eff19b7b4b180276eae122 /libcore/cell.rs
parenttweak: /driver option specifies /fixed:no implicitly as well (diff)
downloadkmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.tar.xz
kmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.zip
update libcore to 2016-04-29 nightly
Diffstat (limited to 'libcore/cell.rs')
-rw-r--r--libcore/cell.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/libcore/cell.rs b/libcore/cell.rs
index a1c7a29..257027d 100644
--- a/libcore/cell.rs
+++ b/libcore/cell.rs
@@ -859,3 +859,10 @@ impl<T: ?Sized> UnsafeCell<T> {
&self.value as *const T as *mut T
}
}
+
+#[stable(feature = "unsafe_cell_default", since = "1.9.0")]
+impl<T: Default> Default for UnsafeCell<T> {
+ fn default() -> UnsafeCell<T> {
+ UnsafeCell::new(Default::default())
+ }
+}