rust-lang / rust-lang/rustfmt

Refactor `Shape`

Open
#2,825 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-cleanup
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

Shape is one of the key abstractions in Rustfmt, representing the space into which an AST node can be written. Unfortunately it is a mess - the structure is weird, the fields are badly named, and the methods are unintuitive. Documentation is also non-existent. We can do better!

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 by locating the Shape abstraction in the rustfmt codebase and reading its fields, methods, and callers. The issue provides no specific files or tests; done would require a clearer structure, better names and method interfaces, and documentation for the abstraction.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.