rust-lang / rust-lang/reference

[patterns.ref.info] unclear wording: "and, thus, borrow them"

Open
#1,849 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-patterns
Dominant language
Rust
Stars
1.6k
Forks
607
PR merge metrics
PR metrics pending

Description

The first sentence of [patterns.ref.info] states (my emphasis):

Reference patterns dereference the pointers that are being matched and, thus, borrow them.

The emphasised part reads a bit confusing to me and I'm still unsure what is meant by it. Maybe it could be clarified? Or omitted? I can't find similar terminology in the FLS.

The URLO topic that raised the issue:

https://users.rust-lang.org/t/discussing-reference-patterns/130495?u=jofas

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 with the reference-patterns section linked in patterns.html, then compare its wording with the FLS reference and the linked URLO discussion. Clarify or remove the phrase “and, thus, borrow them” so the sentence states the intended behavior unambiguously; the updated documentation should address the reported confusion.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.