about summary refs log tree commit diff
path: root/library/alloc/src/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/src/sync.rs')
-rw-r--r--library/alloc/src/sync.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs
index 0487dc5a858..bfbdfce5718 100644
--- a/library/alloc/src/sync.rs
+++ b/library/alloc/src/sync.rs
@@ -1381,8 +1381,8 @@ impl<T: ?Sized> Arc<T> {
     /// let x_ptr: *const [u32] = Arc::into_raw(x);
     ///
     /// unsafe {
-    ///     let x: Arc<[u32; 3]> = Arc::from_raw(x_ptr.cast::<[u32; 3]>())
-    ///     assert_eq!(x.as_ref(), &[1, 2, 3]);
+    ///     let x: Arc<[u32; 3]> = Arc::from_raw(x_ptr.cast::<[u32; 3]>());
+    ///     assert_eq!(&*x, &[1, 2, 3]);
     /// }
     /// ```
     #[inline]