RS.CLIPPY.ZST_OFFSET
Check for offset calculations on raw pointers to zero-sized types
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: zst_offset. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for offset(_), wrapping_{add, sub}, etc. on raw pointers to
zero-sized types
Why is this bad?
This is a no-op, and likely unintended
Example
unsafe { (&() as *const ()).offset(1) };