]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/noop-method-call.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / lint / noop-method-call.stderr
1 warning: call to `.clone()` on a reference in this situation does nothing
2 --> $DIR/noop-method-call.rs:16:71
3 |
4 LL | let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref.clone();
5 | ^^^^^^^^ unnecessary method call
6 |
7 note: the lint level is defined here
8 --> $DIR/noop-method-call.rs:4:9
9 |
10 LL | #![warn(noop_method_call)]
11 | ^^^^^^^^^^^^^^^^
12 = note: the type `&PlainType<u32>` which `clone` is being called on is the same as the type returned from `clone`, so the method call does not do anything and can be removed
13
14 warning: call to `.deref()` on a reference in this situation does nothing
15 --> $DIR/noop-method-call.rs:28:63
16 |
17 LL | let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
18 | ^^^^^^^^ unnecessary method call
19 |
20 = note: the type `&PlainType<u32>` which `deref` is being called on is the same as the type returned from `deref`, so the method call does not do anything and can be removed
21
22 warning: call to `.borrow()` on a reference in this situation does nothing
23 --> $DIR/noop-method-call.rs:36:66
24 |
25 LL | let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow();
26 | ^^^^^^^^^ unnecessary method call
27 |
28 = note: the type `&PlainType<u32>` which `borrow` is being called on is the same as the type returned from `borrow`, so the method call does not do anything and can be removed
29
30 warning: call to `.clone()` on a reference in this situation does nothing
31 --> $DIR/noop-method-call.rs:52:19
32 |
33 LL | non_clone_type.clone();
34 | ^^^^^^^^ unnecessary method call
35 |
36 = note: the type `&PlainType<u32>` which `clone` is being called on is the same as the type returned from `clone`, so the method call does not do anything and can be removed
37
38 warning: 4 warnings emitted
39