File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1235,8 +1235,8 @@ impl<T: ?Sized> Rc<T> {
12351235 /// let x_ptr: *const [u32] = Rc::into_raw(x);
12361236 ///
12371237 /// unsafe {
1238- /// let x: Rc<[u32; 3]> = Rc::from_raw(x_ptr.cast::<[u32; 3]>())
1239- /// assert_eq!(x.as_ref() , &[1, 2, 3]);
1238+ /// let x: Rc<[u32; 3]> = Rc::from_raw(x_ptr.cast::<[u32; 3]>());
1239+ /// assert_eq!(&*x , &[1, 2, 3]);
12401240 /// }
12411241 /// ```
12421242 #[ inline]
Original file line number Diff line number Diff line change @@ -1381,8 +1381,8 @@ impl<T: ?Sized> Arc<T> {
13811381 /// let x_ptr: *const [u32] = Arc::into_raw(x);
13821382 ///
13831383 /// unsafe {
1384- /// let x: Arc<[u32; 3]> = Arc::from_raw(x_ptr.cast::<[u32; 3]>())
1385- /// assert_eq!(x.as_ref() , &[1, 2, 3]);
1384+ /// let x: Arc<[u32; 3]> = Arc::from_raw(x_ptr.cast::<[u32; 3]>());
1385+ /// assert_eq!(&*x , &[1, 2, 3]);
13861386 /// }
13871387 /// ```
13881388 #[ inline]
You can’t perform that action at this time.
0 commit comments