rust-lang / rust-lang/rust

[rustdoc] type aliases in function signatures can be confusing

Open
#130,189 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-discussion T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location

https://doc.rust-lang.org/std/io/struct.Lines.html

Summary

https://doc.rust-lang.org/std/io/struct.Lines.html states that Lines::fmt has a return value of "Result"
whereas https://doc.rust-lang.org/std/fmt/trait.Debug.html#tymethod.fmt says that fmt has a return value of "Result<(),E>"

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

Use the linked Lines and Debug documentation pages as the entry points, and compare how the return types of their fmt methods are rendered. Trace the rustdoc source responsible for these signatures; done means the two related function signatures present consistent, unconfusing type information.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Bug
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.