1 #![warn(clippy::rc_mutex)]
2 #![allow(unused, clippy::blacklisted_name)]
7 pub struct MyStructWithPrivItem {
11 pub struct MyStructWithPubItem {
12 pub foo: Rc<Mutex<i32>>,
24 // All of these test should be trigger the lint because they are not
25 // part of the public api
26 fn test1<T>(foo: Rc<Mutex<T>>) {}
27 fn test2(foo: Rc<Mutex<MyEnum>>) {}
28 fn test3(foo: Rc<Mutex<SubT<usize>>>) {}
30 // All of these test should be allowed because they are part of the
31 // public api and `avoid_breaking_exported_api` is `false` by default.
32 pub fn pub_test1<T>(foo: Rc<Mutex<T>>) {}
33 pub fn pub_test2(foo: Rc<Mutex<MyEnum>>) {}
34 pub fn pub_test3(foo: Rc<Mutex<SubT<usize>>>) {}