fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.0 KiB59 linesraw
1warning: call to `.clone()` on a reference in this situation does nothing
2  --> $DIR/noop-method-call.rs:16:25
3   |
4LL |     let _ = &mut encoded.clone();
5   |                         ^^^^^^^^ help: remove this redundant call
6   |
7   = 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
8   = note: `#[warn(noop_method_call)]` on by default
9
10warning: call to `.clone()` on a reference in this situation does nothing
11  --> $DIR/noop-method-call.rs:18:21
12   |
13LL |     let _ = &encoded.clone();
14   |                     ^^^^^^^^ help: remove this redundant call
15   |
16   = 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
17
18warning: call to `.clone()` on a reference in this situation does nothing
19  --> $DIR/noop-method-call.rs:24:71
20   |
21LL |     let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref.clone();
22   |                                                                       ^^^^^^^^ help: remove this redundant call
23   |
24   = 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
25
26warning: call to `.deref()` on a reference in this situation does nothing
27  --> $DIR/noop-method-call.rs:32:63
28   |
29LL |     let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
30   |                                                               ^^^^^^^^ help: remove this redundant call
31   |
32   = 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
33
34warning: call to `.borrow()` on a reference in this situation does nothing
35  --> $DIR/noop-method-call.rs:36:66
36   |
37LL |     let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow();
38   |                                                                  ^^^^^^^^^ help: remove this redundant call
39   |
40   = 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
41
42warning: call to `.clone()` on a reference in this situation does nothing
43  --> $DIR/noop-method-call.rs:45:19
44   |
45LL |     non_clone_type.clone();
46   |                   ^^^^^^^^ help: remove this redundant call
47   |
48   = 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
49
50warning: call to `.clone()` on a reference in this situation does nothing
51  --> $DIR/noop-method-call.rs:50:19
52   |
53LL |     non_clone_type.clone();
54   |                   ^^^^^^^^ help: remove this redundant call
55   |
56   = 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
57
58warning: 7 warnings emitted
59