File tree 2 files changed +4
-4
lines changed
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> {
1235
1235
/// let x_ptr: *const [u32] = Rc::into_raw(x);
1236
1236
///
1237
1237
/// 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]);
1240
1240
/// }
1241
1241
/// ```
1242
1242
#[ inline]
Original file line number Diff line number Diff line change @@ -1381,8 +1381,8 @@ impl<T: ?Sized> Arc<T> {
1381
1381
/// let x_ptr: *const [u32] = Arc::into_raw(x);
1382
1382
///
1383
1383
/// 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]);
1386
1386
/// }
1387
1387
/// ```
1388
1388
#[ inline]
You can’t perform that action at this time.
0 commit comments