]> git.lizzy.rs Git - rust.git/commitdiff
rc_mutex: known problems
authorlyj <sjtu5140809011@gmail.com>
Fri, 2 Jul 2021 14:10:13 +0000 (22:10 +0800)
committerlyj <sjtu5140809011@gmail.com>
Fri, 2 Jul 2021 14:10:13 +0000 (22:10 +0800)
clippy_lints/src/types/mod.rs

index 5850a10d80fa836700817c676ff147764166bcf0..c26268a875cc06123b05968d2d3ca9e5701647f1 100644 (file)
     /// **Why is this bad?** `Rc` is used in single thread and `Mutex` is used in multi thread.
     /// Consider using `Rc<RefCell<T>>` in single thread or `Arc<Mutex<T>>` in multi thread.
     ///
-    /// **Known problems:** Maybe false positive on trait generic.
+    /// **Known problems:** Sometimes combining generic types can lead to the requirement that a
+    /// type use Rc in conjunction with Mutex. We must consider those cases false positives, but
+    /// alas they are quite hard to rule out. Luckily they are also rare.
     ///
     /// **Example:**
     /// ```rust,ignore