Skip to content

Commit b9cc2fe

Browse files
committed
rc_mutex: known problems
1 parent 683c557 commit b9cc2fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_lints/src/types/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ declare_clippy_lint! {
257257
/// **Why is this bad?** `Rc` is used in single thread and `Mutex` is used in multi thread.
258258
/// Consider using `Rc<RefCell<T>>` in single thread or `Arc<Mutex<T>>` in multi thread.
259259
///
260-
/// **Known problems:** Maybe false positive on trait generic.
260+
/// **Known problems:** Sometimes combining generic types can lead to the requirement that a
261+
/// type use Rc in conjunction with Mutex. We must consider those cases false positives, but
262+
/// alas they are quite hard to rule out. Luckily they are also rare.
261263
///
262264
/// **Example:**
263265
/// ```rust,ignore

0 commit comments

Comments
 (0)