rust-lang / rust-lang/reference

Type Layout -> Layout; Make values primary

Open
#934 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-type-layout C-bug
Dominant language
Rust
Stars
1.6k
Forks
607
PR merge metrics
PR metrics pending

Description

Values have a defined layout, but types don't always have defined layout.

E.g. dynamically sized types have dynamic types and where padding is located depends on which enum discriminant is active.

As such, we should rename the type layout chapter to just layout and describe it as properties of values and then state that types may have defined properties if all values of the type have the same value for that property.

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 type layout chapter and review how it currently describes values and types. Rename the chapter to layout, describe layout as properties of values, and explain that a type has a defined property only when all its values share it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.