rust-lang / rust-lang/reference
Elaborate on relative precedence between method calls and field accesses
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
Currently, the precedence table lists method calls higher than field accesses. Which gives the impression that for example a.b.c() is parsed as a.(b.c()) rather than the correct (a.b).c(). I don't know if that's an actual error in the table (seems unlikely?) or that the writers had a different interpretation in mind than I do. Either way, it would be useful to clarify how this is actually intended.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Rust Reference's precedence table and compare its wording with the a.b.c() example in the issue. Clarify how method calls and field accesses associate, so the documented precedence matches the intended (a.b).c() parse.
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
- 48/100