diff --git a/src/lib.rs b/src/lib.rs index 3e851bf..7dfa5e5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,24 +10,26 @@ use std::{ /// /// The data structure is not thread safe. /// It is not even safe to move to another thread. -/// (i.e., !Send). +/// (!Send and !Sync for whatever type of T). +/// +/// Not sync. /// ```compile_fail,E0277 /// use cdlist::LinkNode; /// use std::sync::atomic::AtomicUsize; /// -/// fn impl_send(val: T) {} +/// fn impl_sync(val: T) {} /// /// should not compile -/// impl_send(LinkNode::new(AtomicUsize::new(0))); +/// impl_sync(LinkNode::new(AtomicUsize::new(0))); /// ``` /// -/// Nor sync: +/// Not send. /// ```compile_fail,E0277 /// use cdlist::LinkNode; /// use std::sync::atomic::AtomicUsize; /// -/// fn impl_sync(val: T) {} +/// fn impl_send(val: T) {} /// /// should not compile -/// impl_sync(LinkNode::new(AtomicUsize::new(0))); +/// impl_send(LinkNode::new(AtomicUsize::new(0))); /// ``` pub struct LinkNode(Pin>>);