@@ -2,7 +2,7 @@ error: using `.clone()` on a ref-counted pointer
2
2
--> tests/ui/unnecessary_clone.rs:23:5
3
3
|
4
4
LL | rc.clone();
5
- | ^^^^^^^^^^ help: try: `Rc::<bool>::clone(&rc)`
5
+ | ^^^^^^^^^^ help: try: `std::rc:: Rc::<bool>::clone(&rc)`
6
6
|
7
7
= note: `-D clippy::clone-on-ref-ptr` implied by `-D warnings`
8
8
= help: to override `-D warnings` add `#[allow(clippy::clone_on_ref_ptr)]`
@@ -11,25 +11,25 @@ error: using `.clone()` on a ref-counted pointer
11
11
--> tests/ui/unnecessary_clone.rs:28:5
12
12
|
13
13
LL | arc.clone();
14
- | ^^^^^^^^^^^ help: try: `Arc::<bool>::clone(&arc)`
14
+ | ^^^^^^^^^^^ help: try: `std::sync:: Arc::<bool>::clone(&arc)`
15
15
16
16
error: using `.clone()` on a ref-counted pointer
17
17
--> tests/ui/unnecessary_clone.rs:33:5
18
18
|
19
19
LL | rcweak.clone();
20
- | ^^^^^^^^^^^^^^ help: try: `Weak::<bool>::clone(&rcweak)`
20
+ | ^^^^^^^^^^^^^^ help: try: `std::rc:: Weak::<bool>::clone(&rcweak)`
21
21
22
22
error: using `.clone()` on a ref-counted pointer
23
23
--> tests/ui/unnecessary_clone.rs:38:5
24
24
|
25
25
LL | arc_weak.clone();
26
- | ^^^^^^^^^^^^^^^^ help: try: `Weak::<bool>::clone(&arc_weak)`
26
+ | ^^^^^^^^^^^^^^^^ help: try: `std::sync:: Weak::<bool>::clone(&arc_weak)`
27
27
28
28
error: using `.clone()` on a ref-counted pointer
29
29
--> tests/ui/unnecessary_clone.rs:44:33
30
30
|
31
31
LL | let _: Arc<dyn SomeTrait> = x.clone();
32
- | ^^^^^^^^^ help: try: `Arc::<SomeImpl>::clone(&x)`
32
+ | ^^^^^^^^^ help: try: `std::sync:: Arc::<SomeImpl>::clone(&x)`
33
33
34
34
error: using `clone` on type `T` which implements the `Copy` trait
35
35
--> tests/ui/unnecessary_clone.rs:49:5
@@ -56,7 +56,7 @@ error: using `.clone()` on a ref-counted pointer
56
56
--> tests/ui/unnecessary_clone.rs:108:14
57
57
|
58
58
LL | Some(try_opt!(Some(rc)).clone())
59
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Rc::<u8>::clone(&try_opt!(Some(rc)))`
59
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::rc:: Rc::<u8>::clone(&try_opt!(Some(rc)))`
60
60
61
61
error: aborting due to 9 previous errors
62
62
0 commit comments