Document association of generic arguments in path segments
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- documentation
Research direction
Start by comparing the two enum-variant expressions in the issue and review the generic-argument material proposed in Rust Reference PR 2165, along with the related Rust PR 154971. Determine whether the forms are equivalent and identify other path-segment cases; done means documenting the confirmed association rules and examples in the Reference.
Written by the indexing model from the issue text.
Description
There are some subtle behaviors around where generic arguments can appear in a path, particularly with enum variants. For example:
enum E<T> {
V1 { x: T },
}
fn main() {
// These seem to be the same.
E::V1::<i32> { x: 1 };
E::<i32>::V1 { x: 1 };
}
Are these exactly the same? I'm wondering if there are other oddities like this? This came up when looking at https://github.com/rust-lang/rust/pull/154971.
https://github.com/rust-lang/reference/pull/2165 is adding more documentation on generic arguments and how they are associated, but I don't think it covers this.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 609
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from rust-lang/reference
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
rust-lang/reference#2371 · 3 comments ·
Maintainers usually reply within 1 day
-
A-const-eval A-undefined-behavior
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rust-lang/reference#2266 · 1 comment ·
Maintainers usually reply within 1 day
-
A-resolve
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
All issues in rust-lang/reference
Similar issues
-
component:sight
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
agentic-os-org/ANOLISA#4115 · 1 comment ·
Maintainers usually reply within 1 day
-
A-io-database bug needs triage python
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Change output crossing a compactsize boundary leaves the fee slightly below the requested feerateOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bitcoindevkit/bdk_wallet#578 ·
Maintainers usually reply within 8 days
-
`python.analysis` setting changes (e.g. `completeFunctionParens`) are not picked up until reloadOpenlanguage-server
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days