]> git.lizzy.rs Git - rust.git/blob - tests/ui/rc_mutex.fixed
b36b1d0914bd2979d908954cc893bee6e27cb9e1
[rust.git] / tests / ui / rc_mutex.fixed
1 // run-rustfix
2 #![warn(clippy::rc_mutex)]
3 #![allow(unused_imports)]
4 #![allow(clippy::boxed_local, clippy::needless_pass_by_value)]
5 #![allow(clippy::blacklisted_name, unused_variables, dead_code)]
6
7 use std::cell::RefCell;
8 use std::rc::Rc;
9 use std::sync::Mutex;
10
11 pub struct MyStruct {}
12
13 pub struct SubT<T> {
14     foo: T,
15 }
16
17 pub enum MyEnum {
18     One,
19     Two,
20 }
21
22 pub fn test1<T>(foo: Rc<RefCell<T>>) {}
23
24 pub fn test2(foo: Rc<RefCell<MyEnum>>) {}
25
26 pub fn test3(foo: Rc<RefCell<SubT<usize>>>) {}
27
28 fn main() {}