[Question] Why does parse.expand use an unstable flag to rustc?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3k
- Forks
- 386
- Avg merge
- 1h 43m
- Merged PRs (30d)
- 1
Description
Currently, [parse.expand] uses the -Z unstable pretty=expand option to rustc. This requires using the nightly rustc compiler. There is nothing in the documentation that mentions why this is required, and there isn't much discussion as to why. If macro expansion is needed, is there a reason that cbindgen can't just do cargo expand which does not require any nightly rustc options?
I think that macro expansion is a relatively common requirement, and gating it behind having to use a nightly toolchain is a big cost.
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
Trace the implementation of the parse.expand option and its rustc invocation, then compare that behavior with cargo expand and its toolchain requirements. Determine whether macro expansion can use the proposed approach without losing supported behavior; document the rationale or define the required change and validation criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100