2021-01-11 04:47:16 -06:00
warning: call to `.clone()` on a reference in this situation does nothing
2024-02-22 12:01:12 -06:00
--> $DIR/noop-method-call.rs:15:25
2021-01-05 09:14:39 -06:00
|
2023-07-23 04:56:56 -05:00
LL | let _ = &mut encoded.clone();
| ^^^^^^^^ help: remove this redundant call
2021-01-05 09:14:39 -06:00
|
2023-07-23 04:56:56 -05:00
= note: the type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]` copies the reference, which does not do anything and can be removed
2023-05-24 11:05:42 -05:00
= note: `#[warn(noop_method_call)]` on by default
2021-02-16 15:39:05 -06:00
2023-07-23 04:56:56 -05:00
warning: call to `.clone()` on a reference in this situation does nothing
2024-02-22 12:01:12 -06:00
--> $DIR/noop-method-call.rs:17:21
2023-04-28 12:17:46 -05:00
|
2023-07-23 04:56:56 -05:00
LL | let _ = &encoded.clone();
| ^^^^^^^^ help: remove this redundant call
2023-04-28 12:17:46 -05:00
|
2023-07-23 04:56:56 -05:00
= note: the type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]` copies the reference, which does not do anything and can be removed
2023-04-28 12:17:46 -05:00
2023-07-23 04:56:56 -05:00
warning: call to `.clone()` on a reference in this situation does nothing
2024-02-22 12:01:12 -06:00
--> $DIR/noop-method-call.rs:23:71
2021-02-16 15:39:05 -06:00
|
2023-07-23 04:56:56 -05:00
LL | let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref.clone();
2024-02-22 12:01:12 -06:00
| ^^^^^^^^
2021-02-16 15:39:05 -06:00
|
2023-07-23 04:56:56 -05:00
= note: the type `PlainType<u32>` does not implement `Clone`, so calling `clone` on `&PlainType<u32>` copies the reference, which does not do anything and can be removed
2024-02-22 12:01:12 -06:00
help: remove this redundant call
|
LL - let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref.clone();
LL + let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref;
|
help: if you meant to clone `PlainType<u32>`, implement `Clone` for it
|
LL + #[derive(Clone)]
LL | struct PlainType<T>(T);
|
2021-02-16 15:39:05 -06:00
2023-07-23 04:56:56 -05:00
warning: call to `.deref()` on a reference in this situation does nothing
2024-02-22 12:01:12 -06:00
--> $DIR/noop-method-call.rs:31:63
2023-04-28 12:17:46 -05:00
|
LL | let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
2024-02-22 12:01:12 -06:00
| ^^^^^^^^
2023-07-23 04:56:56 -05:00
|
= note: the type `PlainType<u32>` does not implement `Deref`, so calling `deref` on `&PlainType<u32>` copies the reference, which does not do anything and can be removed
2024-02-22 12:01:12 -06:00
help: remove this redundant call
|
LL - let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
LL + let non_deref_type_deref: &PlainType<u32> = non_deref_type;
|
help: if you meant to clone `PlainType<u32>`, implement `Clone` for it
|
LL + #[derive(Clone)]
LL | struct PlainType<T>(T);
|
2023-04-28 12:17:46 -05:00
2021-02-16 15:39:05 -06:00
warning: call to `.borrow()` on a reference in this situation does nothing
2024-02-22 12:01:12 -06:00
--> $DIR/noop-method-call.rs:35:66
2021-02-16 15:39:05 -06:00
|
LL | let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow();
2024-02-22 12:01:12 -06:00
| ^^^^^^^^^
2021-02-16 15:39:05 -06:00
|
2023-05-25 00:21:44 -05:00
= note: the type `PlainType<u32>` does not implement `Borrow`, so calling `borrow` on `&PlainType<u32>` copies the reference, which does not do anything and can be removed
2024-02-22 12:01:12 -06:00
help: remove this redundant call
|
LL - let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow();
LL + let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type;
|
help: if you meant to clone `PlainType<u32>`, implement `Clone` for it
|
LL + #[derive(Clone)]
LL | struct PlainType<T>(T);
|
2021-01-05 09:14:39 -06:00
2021-01-11 04:47:16 -06:00
warning: call to `.clone()` on a reference in this situation does nothing
2024-02-22 12:01:12 -06:00
--> $DIR/noop-method-call.rs:44:19
2022-10-03 22:22:45 -05:00
|
LL | non_clone_type.clone();
2024-02-22 12:01:12 -06:00
| ^^^^^^^^
2022-10-03 22:22:45 -05:00
|
2023-05-25 00:21:44 -05:00
= note: the type `PlainType<T>` does not implement `Clone`, so calling `clone` on `&PlainType<T>` copies the reference, which does not do anything and can be removed
2024-02-22 12:01:12 -06:00
help: remove this redundant call
|
LL - non_clone_type.clone();
LL + non_clone_type;
|
help: if you meant to clone `PlainType<T>`, implement `Clone` for it
|
LL + #[derive(Clone)]
LL | struct PlainType<T>(T);
|
2022-10-03 22:22:45 -05:00
warning: call to `.clone()` on a reference in this situation does nothing
2024-02-22 12:01:12 -06:00
--> $DIR/noop-method-call.rs:49:19
2021-01-05 09:14:39 -06:00
|
2021-02-16 08:12:19 -06:00
LL | non_clone_type.clone();
2024-02-22 12:01:12 -06:00
| ^^^^^^^^
2021-01-11 04:47:16 -06:00
|
2023-05-25 00:21:44 -05:00
= note: the type `PlainType<u32>` does not implement `Clone`, so calling `clone` on `&PlainType<u32>` copies the reference, which does not do anything and can be removed
2024-02-22 12:01:12 -06:00
help: remove this redundant call
|
LL - non_clone_type.clone();
LL + non_clone_type;
|
help: if you meant to clone `PlainType<u32>`, implement `Clone` for it
|
LL + #[derive(Clone)]
LL | struct PlainType<T>(T);
|
2021-01-05 09:14:39 -06:00
2023-07-23 04:56:56 -05:00
warning: 7 warnings emitted
2021-01-05 09:14:39 -06:00