rust-lang / rust-lang/rust

MGCA: support struct expressions with `..rest` patterns as direct const args?

Open
#150,622 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-const-generics E-needs-design F-min_generic_const_args S-blocked T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Currently while we do support Struct { field: N } as a const argument, we don't support things like Struct { field: N, ..N2 }. This is possibly something worth supporting. This will exacerbate #150621 and I'm not sure it's important enough to support this that we should do so before finding a way to share the logic.

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 investigating the existing support for Struct { field: N } as a const argument and read the related issue #150621. Determine whether struct expressions containing ..rest should be supported directly and how that interacts with the logic-sharing concern; the issue does not identify files, tests, or a settled completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.