diff options
| author | lyj <sjtu5140809011@gmail.com> | 2021-07-02 22:10:13 +0800 |
|---|---|---|
| committer | lyj <sjtu5140809011@gmail.com> | 2021-07-02 22:10:13 +0800 |
| commit | b9cc2feaaa0111385db4ea0b1ff846202d6ab9b4 (patch) | |
| tree | 05ae214b8d4c860489a9d0fcb91b1f64b8fc6aa1 | |
| parent | 683c557afe9de3288478112a0db6d4092f0248ea (diff) | |
rc_mutex: known problems
| -rw-r--r-- | clippy_lints/src/types/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clippy_lints/src/types/mod.rs b/clippy_lints/src/types/mod.rs index 5850a10d80f..c26268a875c 100644 --- a/clippy_lints/src/types/mod.rs +++ b/clippy_lints/src/types/mod.rs @@ -257,7 +257,9 @@ declare_clippy_lint! { /// **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 |
