Skip to content

Lacking documentation on thin vs fat/wide pointers #164818

Closed

Description

@niluxv

Location (URL)

https://doc.rust-lang.org/std/ptr/fn.addr_eq.html
https://doc.rust-lang.org/std/ptr/fn.from_raw_parts.html

Summary

We should document centrally the distinction between thin and fat pointers. The currently the terms are only defined in documentation of experimental APIs, and the existence of fat pointers seems to be mostly ignored in the documentation (e.g. #163372).

std::ptr::addr_eq uses the word fat pointer without defining it. The experimental std::ptr::from_raw_parts inconsistently uses "wide pointer". <*const T>::is_null works around mentioning fat pointers by talking about unsized types.

Came up in #163372.

Activity

  1. added
    A-docs
    on Oct 23, 2026
  2. added
    needs-triage
    on Oct 23, 2026
  3. added
    T-libs
    T-opsem
    and removed
    needs-triage
    on Oct 23, 2026
  4. MarioIlRosso commented on Nov 14, 2026

    @MarioIlRosso
    Contributor

    @rustbot claim

  5. linked a pull request that will close this issueDocument wide pointers in core::ptr module #165956on Nov 14, 2026
  6. added a commit that references this issue on Nov 16, 2026
  7. added 5 commits that reference this issue on Nov 16, 2026
  8. added a commit that references this issue on Nov 16, 2026
  9. added a commit that references this issue on Nov 16, 2026
  10. added a commit that references this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-docsT-libsT-opsem

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions