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