|
1 | 1 | warning: call to `.clone()` on a reference in this situation does nothing |
2 | | - --> $DIR/noop-method-call.rs:16:71 |
| 2 | + --> $DIR/noop-method-call.rs:15:71 |
3 | 3 | | |
4 | 4 | LL | let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref.clone(); |
5 | 5 | | ^^^^^^^^ unnecessary method call |
6 | 6 | | |
7 | 7 | = 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 |
8 | | -note: the lint level is defined here |
9 | | - --> $DIR/noop-method-call.rs:4:9 |
10 | | - | |
11 | | -LL | #![warn(noop_method_call)] |
12 | | - | ^^^^^^^^^^^^^^^^ |
| 8 | + = note: `#[warn(noop_method_call)]` on by default |
13 | 9 |
|
14 | 10 | warning: using `.clone()` on a double reference, which returns `&CloneType<u32>` instead of cloning the inner type |
15 | | - --> $DIR/noop-method-call.rs:23:63 |
| 11 | + --> $DIR/noop-method-call.rs:22:63 |
16 | 12 | | |
17 | 13 | LL | let clone_type_ref_clone: &CloneType<u32> = clone_type_ref.clone(); |
18 | 14 | | ^^^^^^^^ |
19 | 15 | | |
20 | 16 | = note: `#[warn(suspicious_double_ref_op)]` on by default |
21 | 17 |
|
22 | 18 | warning: call to `.deref()` on a reference in this situation does nothing |
23 | | - --> $DIR/noop-method-call.rs:27:63 |
| 19 | + --> $DIR/noop-method-call.rs:26:63 |
24 | 20 | | |
25 | 21 | LL | let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref(); |
26 | 22 | | ^^^^^^^^ unnecessary method call |
27 | 23 | | |
28 | 24 | = 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 |
29 | 25 |
|
30 | 26 | warning: using `.deref()` on a double reference, which returns `&PlainType<u32>` instead of dereferencing the inner type |
31 | | - --> $DIR/noop-method-call.rs:31:63 |
| 27 | + --> $DIR/noop-method-call.rs:30:63 |
32 | 28 | | |
33 | 29 | LL | let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref(); |
34 | 30 | | ^^^^^^^^ |
35 | 31 |
|
36 | 32 | warning: call to `.borrow()` on a reference in this situation does nothing |
37 | | - --> $DIR/noop-method-call.rs:35:66 |
| 33 | + --> $DIR/noop-method-call.rs:34:66 |
38 | 34 | | |
39 | 35 | LL | let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow(); |
40 | 36 | | ^^^^^^^^^ unnecessary method call |
41 | 37 | | |
42 | 38 | = 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 |
43 | 39 |
|
44 | 40 | warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type |
45 | | - --> $DIR/noop-method-call.rs:43:44 |
| 41 | + --> $DIR/noop-method-call.rs:42:44 |
46 | 42 | | |
47 | 43 | LL | let _v: Vec<&str> = xs.iter().map(|x| x.clone()).collect(); // could use `*x` instead |
48 | 44 | | ^^^^^^^^ |
49 | 45 |
|
50 | 46 | warning: call to `.clone()` on a reference in this situation does nothing |
51 | | - --> $DIR/noop-method-call.rs:48:19 |
| 47 | + --> $DIR/noop-method-call.rs:47:19 |
52 | 48 | | |
53 | 49 | LL | non_clone_type.clone(); |
54 | 50 | | ^^^^^^^^ unnecessary method call |
55 | 51 | | |
56 | 52 | = note: the type `&PlainType<T>` 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 |
57 | 53 |
|
58 | 54 | warning: call to `.clone()` on a reference in this situation does nothing |
59 | | - --> $DIR/noop-method-call.rs:53:19 |
| 55 | + --> $DIR/noop-method-call.rs:52:19 |
60 | 56 | | |
61 | 57 | LL | non_clone_type.clone(); |
62 | 58 | | ^^^^^^^^ unnecessary method call |
|
0 commit comments