rust-lang / rust-lang/reference

Unclear block attribute positions

Open
#1,155 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The Attributes on block expressions section specifies when inner attributes are allowed in blocks, it's unclear whether that applies to outer attributes too? Even more confusing is that the example showcases outer attributes instead

https://github.com/rust-lang/reference/blob/411c2f0d5cebf48453ae2d136ad0c5e611d39aec/src/expressions/block-expr.md?plain=1#L143-L164

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 src/expressions/block-expr.md and the “Attributes on block expressions” section at the linked lines. Compare the wording about inner attributes with the example showing outer attributes, then clarify the intended rules and make the example consistent. Done means the section clearly distinguishes the two attribute positions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.