There was an error while loading. Please reload this page.
1 parent b1344ab commit 3eee486Copy full SHA for 3eee486
1 file changed
src/libcore/cell.rs
@@ -559,6 +559,16 @@ impl<T> Deref for Cell<[T]> {
559
}
560
561
562
+#[unstable(feature = "as_cell", issue="43038")]
563
+impl<T> DerefMut for Cell<[T]> {
564
+ #[inline]
565
+ fn deref_mut(&mut self) -> &mut [Cell<T>] {
566
+ unsafe {
567
+ &mut *(self as *mut Cell<[T]> as *mut [Cell<T>])
568
+ }
569
570
+}
571
+
572
/// A mutable memory location with dynamically checked borrow rules
573
///
574
/// See the [module-level documentation](index.html) for more.
0 commit comments