We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81e85ce commit 6b75e3dCopy full SHA for 6b75e3d
library/core/src/pin.rs
@@ -541,7 +541,7 @@ impl<P: Deref> Pin<P> {
541
/// use std::pin::Pin;
542
///
543
/// fn move_pinned_rc<T>(mut x: Rc<T>) {
544
- /// let pinned = unsafe { Pin::new_unchecked(x.clone()) };
+ /// let pinned = unsafe { Pin::new_unchecked(Rc::clone(&x)) };
545
/// {
546
/// let p: Pin<&T> = pinned.as_ref();
547
/// // This should mean the pointee can never move again.
library/core/src/sync/atomic.rs
@@ -76,7 +76,7 @@
76
//! fn main() {
77
//! let spinlock = Arc::new(AtomicUsize::new(1));
78
//!
79
-//! let spinlock_clone = spinlock.clone();
+//! let spinlock_clone = Arc::clone(&spinlock);
80
//! let thread = thread::spawn(move|| {
81
//! spinlock_clone.store(0, Ordering::SeqCst);
82
//! });
0 commit comments