Incorrect docs for comparing raw pointers to DST
Open
@asquared31415 is already working on this.
Since Jun 9, 2026.
A-docs
A-DSTs
A-raw-pointers
needs-triage
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location (URL)
https://doc.rust-lang.org/nightly/std/primitive.pointer.html#impl-PartialEq-for-*const+T
https://doc.rust-lang.org/nightly/std/primitive.pointer.html#impl-PartialOrd-for-*const+T
Summary
From my testing, comparing raw pointers that point to a DST (e.g., *const [u8]) seems to also compare the pointer metadata. However, the documentation says that it only compares the addresses.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.