mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
rc_mutex: known problems
This commit is contained in:
parent
683c557afe
commit
b9cc2feaaa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user