@@ -2,7 +2,7 @@ error: using `.clone()` on a ref-counted pointer
22 --> tests/ui/unnecessary_clone.rs:23:5
33 |
44LL | rc.clone();
5- | ^^^^^^^^^^ help: try: `Rc::<bool>::clone(&rc)`
5+ | ^^^^^^^^^^ help: try: `std::rc:: Rc::<bool>::clone(&rc)`
66 |
77 = note: `-D clippy::clone-on-ref-ptr` implied by `-D warnings`
88 = help: to override `-D warnings` add `#[allow(clippy::clone_on_ref_ptr)]`
@@ -11,25 +11,25 @@ error: using `.clone()` on a ref-counted pointer
1111 --> tests/ui/unnecessary_clone.rs:28:5
1212 |
1313LL | arc.clone();
14- | ^^^^^^^^^^^ help: try: `Arc::<bool>::clone(&arc)`
14+ | ^^^^^^^^^^^ help: try: `std::sync:: Arc::<bool>::clone(&arc)`
1515
1616error: using `.clone()` on a ref-counted pointer
1717 --> tests/ui/unnecessary_clone.rs:33:5
1818 |
1919LL | rcweak.clone();
20- | ^^^^^^^^^^^^^^ help: try: `Weak::<bool>::clone(&rcweak)`
20+ | ^^^^^^^^^^^^^^ help: try: `std::rc:: Weak::<bool>::clone(&rcweak)`
2121
2222error: using `.clone()` on a ref-counted pointer
2323 --> tests/ui/unnecessary_clone.rs:38:5
2424 |
2525LL | arc_weak.clone();
26- | ^^^^^^^^^^^^^^^^ help: try: `Weak::<bool>::clone(&arc_weak)`
26+ | ^^^^^^^^^^^^^^^^ help: try: `std::sync:: Weak::<bool>::clone(&arc_weak)`
2727
2828error: using `.clone()` on a ref-counted pointer
2929 --> tests/ui/unnecessary_clone.rs:44:33
3030 |
3131LL | let _: Arc<dyn SomeTrait> = x.clone();
32- | ^^^^^^^^^ help: try: `Arc::<SomeImpl>::clone(&x)`
32+ | ^^^^^^^^^ help: try: `std::sync:: Arc::<SomeImpl>::clone(&x)`
3333
3434error: using `clone` on type `T` which implements the `Copy` trait
3535 --> tests/ui/unnecessary_clone.rs:49:5
@@ -56,7 +56,7 @@ error: using `.clone()` on a ref-counted pointer
5656 --> tests/ui/unnecessary_clone.rs:108:14
5757 |
5858LL | 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)))`
6060
6161error: aborting due to 9 previous errors
6262
0 commit comments