diff --git a/clippy_lints/src/arc_with_non_send_sync.rs b/clippy_lints/src/arc_with_non_send_sync.rs index 2e14f81f8e4..ca2023ee0be 100644 --- a/clippy_lints/src/arc_with_non_send_sync.rs +++ b/clippy_lints/src/arc_with_non_send_sync.rs @@ -17,10 +17,10 @@ declare_clippy_lint! { /// Wrapping a type in Arc doesn't add thread safety to the underlying data, so data races /// could occur when touching the underlying data. /// - /// ### Example. + /// ### Example /// ```rust - /// use std::cell::RefCell; - /// use std::sync::Arc; + /// # use std::cell::RefCell; + /// # use std::sync::Arc; /// /// fn main() { /// // This is safe, as `i32` implements `Send` and `Sync`. @@ -30,7 +30,6 @@ declare_clippy_lint! { /// let b = Arc::new(RefCell::new(42)); /// } /// ``` - /// ``` #[clippy::version = "1.72.0"] pub ARC_WITH_NON_SEND_SYNC, correctness, @@ -63,7 +62,7 @@ impl LateLintPass<'_> for ArcWithNonSendSync { "usage of `Arc<T>` where `T` is not `Send` or `Sync`", None, "consider using `Rc<T>` instead or wrapping `T` in a std::sync type like \ - Mutex<T>", + `Mutex<T>`", ); } }