@@ -352,7 +352,7 @@ impl AtomicBool {
352
352
/// let a = &*AtomicBool::from_mut_slice(&mut some_bools);
353
353
/// std::thread::scope(|s| {
354
354
/// for i in 0..a.len() {
355
- /// s.spawn(move |_ | a[i].store(true, Ordering::Relaxed));
355
+ /// s.spawn(move || a[i].store(true, Ordering::Relaxed));
356
356
/// }
357
357
/// });
358
358
/// assert_eq!(some_bools, [true; 10]);
@@ -984,7 +984,7 @@ impl<T> AtomicPtr<T> {
984
984
/// let a = &*AtomicPtr::from_mut_slice(&mut some_ptrs);
985
985
/// std::thread::scope(|s| {
986
986
/// for i in 0..a.len() {
987
- /// s.spawn(move |_ | {
987
+ /// s.spawn(move || {
988
988
/// let name = Box::new(format!("thread{i}"));
989
989
/// a[i].store(Box::into_raw(name), Ordering::Relaxed);
990
990
/// });
@@ -1533,7 +1533,7 @@ macro_rules! atomic_int {
1533
1533
#[ doc = concat!( "let a = &*" , stringify!( $atomic_type) , "::from_mut_slice(&mut some_ints);" ) ]
1534
1534
/// std::thread::scope(|s| {
1535
1535
/// for i in 0..a.len() {
1536
- /// s.spawn(move |_ | a[i].store(i as _, Ordering::Relaxed));
1536
+ /// s.spawn(move || a[i].store(i as _, Ordering::Relaxed));
1537
1537
/// }
1538
1538
/// });
1539
1539
/// for (i, n) in some_ints.into_iter().enumerate() {
0 commit comments