2022-12-29 07:28:34 -06:00
|
|
|
error: argument to `std::mem::size_of_val()` is a reference to a reference
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/size_of_ref.rs:13:5
|
2022-12-29 07:28:34 -06:00
|
|
|
|
|
|
|
|
LL | size_of_val(&&x);
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
|
|
|
= note: `-D clippy::size-of-ref` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::size_of_ref)]`
|
2022-12-29 07:28:34 -06:00
|
|
|
|
|
|
|
error: argument to `std::mem::size_of_val()` is a reference to a reference
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/size_of_ref.rs:15:5
|
2022-12-29 07:28:34 -06:00
|
|
|
|
|
|
|
|
LL | size_of_val(&y);
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
|
|
|
|
|
|
|
error: argument to `std::mem::size_of_val()` is a reference to a reference
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/size_of_ref.rs:27:9
|
2022-12-29 07:28:34 -06:00
|
|
|
|
|
|
|
|
LL | std::mem::size_of_val(&self) + (std::mem::size_of::<u8>() * self.data.capacity())
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|