rust-lang / rust-lang/reference

Consider improving wording about generic functions and traits.

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

Nobody has claimed this yet.

Language Cleanup
Dominant language
Rust
Stars
1.6k
Forks
607
PR merge metrics
PR metrics pending

Description

In functions.html

A generic function allows one or more parameterized types to appear in its signature. Each type parameter ...

In traits.html

Type parameters can be specified for a trait to make it generic.

These should be called generic parameters instead. Maybe just move and reference these contents to the Generic parameters chapter.

In generics.html

References, raw pointers, arrays, slices, tuples, and function pointers have lifetime or type parameters as well, but are not referred to with path syntax.

The sentences surrounding this paragraph is talking about items. And it's not really clear what this paragraph actually means...

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 reading the relevant sections in functions.html, traits.html, and generics.html, then compare their terminology with the Generic parameters chapter. Review the surrounding text in generics.html to clarify what the paragraph about references, raw pointers, arrays, slices, tuples, and function pointers means. Done means the wording consistently refers to generic parameters and the explanation is clear in context.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.