@@ -352,7 +352,7 @@ impl AtomicBool {
352352 /// let a = &*AtomicBool::from_mut_slice(&mut some_bools);
353353 /// std::thread::scope(|s| {
354354 /// 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));
356356 /// }
357357 /// });
358358 /// assert_eq!(some_bools, [true; 10]);
@@ -984,7 +984,7 @@ impl<T> AtomicPtr<T> {
984984 /// let a = &*AtomicPtr::from_mut_slice(&mut some_ptrs);
985985 /// std::thread::scope(|s| {
986986 /// for i in 0..a.len() {
987- /// s.spawn(move |_ | {
987+ /// s.spawn(move || {
988988 /// let name = Box::new(format!("thread{i}"));
989989 /// a[i].store(Box::into_raw(name), Ordering::Relaxed);
990990 /// });
@@ -1533,7 +1533,7 @@ macro_rules! atomic_int {
15331533 #[ doc = concat!( "let a = &*" , stringify!( $atomic_type) , "::from_mut_slice(&mut some_ints);" ) ]
15341534 /// std::thread::scope(|s| {
15351535 /// 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));
15371537 /// }
15381538 /// });
15391539 /// for (i, n) in some_ints.into_iter().enumerate() {
0 commit comments