rust-lang / rust-lang/reference

Remove Note on `layout.pointer.unsized`

Open
#1,847 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
607
PR merge metrics
PR metrics pending

Description

This note:
https://doc.rust-lang.org/reference/type-layout.html#r-layout.pointer.unsized

says (as of june 2025):

Though you should not rely on this, all pointers to DSTs are currently twice the size of the size of usize and have the same alignment.

However, this is only partially true since https://doc.rust-lang.org/reference/dynamically-sized-types.html#r-dynamic-sized.pointer-types states that fat pointers are twice the size of a normal pointer (and in the usize section we know that usize is the size of a pointer).

The only "helpful note" here is about the alignment, but even that seems clear by fat pointers being the size of two usize (but technically possible for it to have a weird alignment)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the layout.pointer.unsized section in the Rust Reference and compare its note with the linked dynamically sized types and usize sections. Remove the outdated note while keeping the surrounding pointer-layout guidance consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.