Skip to content

Commit

Permalink
rc_mutex: known problems
Browse files Browse the repository at this point in the history
  • Loading branch information
lengyijun committed Jul 2, 2021
1 parent 683c557 commit b9cc2fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clippy_lints/src/types/mod.rs
Expand Up @@ -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
Expand Down

0 comments on commit b9cc2fe

Please sign in to comment.