1 #![warn(clippy::rc_mutex)]
2 #![allow(clippy::blacklisted_name)]
20 pub fn test1<T>(foo: Rc<Mutex<T>>) {}
22 pub fn test2(foo: Rc<Mutex<MyEnum>>) {}
24 pub fn test3(foo: Rc<Mutex<SubT<usize>>>) {}
27 test1(Rc::new(Mutex::new(1)));
28 test2(Rc::new(Mutex::new(MyEnum::One)));
29 test3(Rc::new(Mutex::new(SubT { foo: 1 })));
31 let _my_struct = MyStruct {
32 foo: Rc::new(Mutex::new(1)),