Skip to content

Commit eac3349

Browse files
committed
Address review comments
1 parent 1695bc4 commit eac3349

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clippy_lints/src/size_of_ref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl LateLintPass<'_> for SizeOfRef {
6666
expr.span,
6767
"argument to `std::mem::size_of_val()` is a reference to a reference",
6868
None,
69-
"dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the generic size of any reference-type",
69+
"dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the size of the reference-type",
7070
);
7171
}
7272
}

tests/ui/size_of_ref.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: argument to `std::mem::size_of_val()` is a reference to a reference
44
LL | size_of_val(&&x);
55
| ^^^^^^^^^^^^^^^^
66
|
7-
= help: dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the generic size of any reference-type
7+
= help: dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the size of the reference-type
88
= note: `-D clippy::size-of-ref` implied by `-D warnings`
99

1010
error: argument to `std::mem::size_of_val()` is a reference to a reference
@@ -13,15 +13,15 @@ error: argument to `std::mem::size_of_val()` is a reference to a reference
1313
LL | size_of_val(&y);
1414
| ^^^^^^^^^^^^^^^
1515
|
16-
= help: dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the generic size of any reference-type
16+
= help: dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the size of the reference-type
1717

1818
error: argument to `std::mem::size_of_val()` is a reference to a reference
1919
--> $DIR/size_of_ref.rs:25:9
2020
|
2121
LL | std::mem::size_of_val(&self) + (std::mem::size_of::<u8>() * self.data.capacity())
2222
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323
|
24-
= help: dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the generic size of any reference-type
24+
= help: dereference the argument to `std::mem::size_of_val()` to get the size of the value instead of the size of the reference-type
2525

2626
error: aborting due to 3 previous errors
2727

0 commit comments

Comments
 (0)