| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:9:5 | |
| | | |
| LL | rc.clone(); | |
| | ^^^^^^^^^^ help: try: `std::rc::Rc::<str>::clone(&rc)` | |
| | | |
| = note: `-D clippy::clone-on-ref-ptr` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::clone_on_ref_ptr)]` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:11:5 | |
| | | |
| LL | rc_weak.clone(); | |
| | ^^^^^^^^^^^^^^^ help: try: `std::rc::Weak::<str>::clone(&rc_weak)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:13:5 | |
| | | |
| LL | arc.clone(); | |
| | ^^^^^^^^^^^ help: try: `std::sync::Arc::<str>::clone(&arc)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:15:5 | |
| | | |
| LL | arc_weak.clone(); | |
| | ^^^^^^^^^^^^^^^^ help: try: `std::sync::Weak::<str>::clone(&arc_weak)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:30:33 | |
| | | |
| LL | let _: Arc<dyn SomeTrait> = x.clone(); | |
| | ^^^^^^^^^ help: try: `std::sync::Arc::<SomeImpl>::clone(&x)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:48:14 | |
| | | |
| LL | Some(try_opt!(Some(rc)).clone()) | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::rc::Rc::<u8>::clone(&try_opt!(Some(rc)))` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:61:23 | |
| | | |
| LL | let rec = rec.clone() as Weak<dyn Fn(u32) -> u32>; | |
| | ^^^^^^^^^^^ help: try: `std::rc::Weak::</* generic */>::clone(rec)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:80:5 | |
| | | |
| LL | rc.clone(); | |
| | ^^^^^^^^^^ help: try: `std::rc::Rc::<str>::clone(&rc)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:82:5 | |
| | | |
| LL | ref_rc.clone(); | |
| | ^^^^^^^^^^^^^^ help: try: `std::rc::Rc::<str>::clone(ref_rc)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:84:5 | |
| | | |
| LL | refmut_rc.clone(); | |
| | ^^^^^^^^^^^^^^^^^ help: try: `std::rc::Rc::<str>::clone(refmut_rc)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:93:9 | |
| | | |
| LL | (rc).clone(); | |
| | ^^^^^^^^^^^^ help: try: `std::rc::Rc::<str>::clone(&(rc))` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:95:9 | |
| | | |
| LL | (&rc).clone(); | |
| | ^^^^^^^^^^^^^ help: try: `std::rc::Rc::<str>::clone(&rc)` | |
| error: using `.clone()` on a ref-counted pointer | |
| --> tests/ui/clone_on_ref_ptr.rs:97:9 | |
| | | |
| LL | (&mut rc).clone(); | |
| | ^^^^^^^^^^^^^^^^^ help: try: `std::rc::Rc::<str>::clone(&mut rc)` | |
| error: aborting due to 13 previous errors | |