]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/rc_clone_in_vec_init/rc.rs
1 #![warn(clippy::rc_clone_in_vec_init)]
7 fn should_warn_simple_case() {
8 let v
= vec
![Rc
::new("x".to_string()); 2];
11 fn should_warn_simple_case_with_big_indentation() {
16 let v
= vec
![Rc
::new("x".to_string()); 2];
21 fn should_warn_complex_case() {
23 std
::rc
::Rc
::new(Mutex
::new({
41 fn should_not_warn_custom_arc() {
51 let v
= vec
![Rc
::new(); 2];
54 fn should_not_warn_vec_from_elem_but_not_rc() {
55 let v
= vec
![String
::new(); 2];
58 Box
::new(std
::rc
::Rc
::new({
67 fn should_not_warn_vec_macro_but_not_from_elem() {
68 let v
= vec
![Rc
::new("x".to_string())];