Skip to content

Commit

Permalink
Fix paste-o in Arc::make_slice_mut() test.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Sep 24, 2023
1 parent ead7a0b commit b621d08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,7 @@ impl<T: Clone, A: Allocator + Clone> Arc<[T], A> {
/// #![feature(make_mut_slice)]
/// use std::sync::Arc;
///
/// let mut data: Arc<[i32]> = Rc::new([10, 20, 30]);
/// let mut data: Arc<[i32]> = Arc::new([10, 20, 30]);
///
/// Arc::make_mut_slice(&mut data)[0] += 1; // Won't clone anything
/// let mut other_data = Arc::clone(&data); // Won't clone inner data
Expand Down

0 comments on commit b621d08

Please sign in to comment.