rust-lang / rust-lang/rust-by-example

print_debug example uses the <> structure syntax before it has been introduced

Open
#1,871 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Handlebars
Stars
8.1k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

The print_debug example does, in fact, have a link at the bottom to the structure example page. But so far, the "<>" part of the structure syntax has not yet been introduced, and the print_debug page does not explain its meaning.

Interestingly, the linked page does not use or refer to this syntax, either.

The syntax may feel familiar to C++ and other developers who have encountered templates. But being new to this, I am not sure if this syntax exactly mimics the semantics in those other languages, and I am not sure we can assume all rust learners have even used another programming language with similar syntax.

The struct example page should almost certainly introduce the <> syntax and provide instances of its use.

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

Read the print_debug example and its linked structure example page first. Introduce the <> structure syntax before it appears in print_debug, explain its meaning, and add examples of its use on the structure page; done means the documentation no longer uses unexplained syntax and the linked page addresses it.

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.