|
1 | 1 | warning: call to `.clone()` on a reference in this situation does nothing |
2 | | - --> $DIR/noop-method-call.rs:24:32 |
| 2 | + --> $DIR/noop-method-call.rs:24:35 |
3 | 3 | | |
4 | 4 | LL | let foo_clone: &Foo<u32> = foo.clone(); |
5 | | - | ^^^^^^^^^^^ unnecessary method call |
| 5 | + | ^^^^^^^^ unnecessary method call |
6 | 6 | | |
7 | 7 | = note: `#[warn(noop_method_call)]` on by default |
8 | | - = note: the type the method is being called on and the return type are functionally equivalent. |
9 | | - = note: therefore, the method call doesn't actually do anything and can be removed. |
| 8 | + = note: the type `&Foo<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. |
10 | 9 |
|
11 | 10 | warning: call to `.deref()` on a reference in this situation does nothing |
12 | | - --> $DIR/noop-method-call.rs:31:39 |
| 11 | + --> $DIR/noop-method-call.rs:31:44 |
13 | 12 | | |
14 | 13 | LL | let derefed: &DerefExample<u32> = deref.deref(); |
15 | | - | ^^^^^^^^^^^^^ unnecessary method call |
| 14 | + | ^^^^^^^^ unnecessary method call |
16 | 15 | | |
17 | | - = note: the type the method is being called on and the return type are functionally equivalent. |
18 | | - = note: therefore, the method call doesn't actually do anything and can be removed. |
| 16 | + = note: the type `&&DerefExample<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. |
19 | 17 |
|
20 | 18 | warning: call to `.borrow()` on a reference in this situation does nothing |
21 | | - --> $DIR/noop-method-call.rs:38:31 |
| 19 | + --> $DIR/noop-method-call.rs:38:32 |
22 | 20 | | |
23 | 21 | LL | let borrowed: &Foo<u32> = a.borrow(); |
24 | | - | ^^^^^^^^^^ unnecessary method call |
| 22 | + | ^^^^^^^^^ unnecessary method call |
25 | 23 | | |
26 | | - = note: the type the method is being called on and the return type are functionally equivalent. |
27 | | - = note: therefore, the method call doesn't actually do anything and can be removed. |
| 24 | + = note: the type `&&Foo<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. |
28 | 25 |
|
29 | 26 | warning: call to `.clone()` on a reference in this situation does nothing |
30 | | - --> $DIR/noop-method-call.rs:47:5 |
| 27 | + --> $DIR/noop-method-call.rs:47:8 |
31 | 28 | | |
32 | 29 | LL | foo.clone(); |
33 | | - | ^^^^^^^^^^^ unnecessary method call |
| 30 | + | ^^^^^^^^ unnecessary method call |
34 | 31 | | |
35 | | - = note: the type the method is being called on and the return type are functionally equivalent. |
36 | | - = note: therefore, the method call doesn't actually do anything and can be removed. |
| 32 | + = note: the type `&Foo<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 | 33 |
|
38 | 34 | warning: 4 warnings emitted |
39 | 35 |
|
0 commit comments