rust-lang / rust-lang/rust

Have a separate `Constructors` section in rustdoc for each type that shows functions that can be used to construct the type.

Open
#122,725 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

When you are reading the documentation of a type sometimes it is difficult to find out, how one should actually create an instance of that type from the documentation.

Having a separate Constructors section for each type, would be useful to navigate the documentation and understand how a type should be created (by calling what method/function) in unknown/unfamiliar crates.

Related pr: https://github.com/rust-lang/rust/pull/107926

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 reviewing the requested rustdoc behavior and the related PR #107926 linked in the issue. Determine how a separate Constructors section should identify and present functions for each type, then verify that the generated documentation shows the section consistently across relevant types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.