rust-lang / rust-lang/rustc-dev-guide
Document common manipulations and operations
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.9k
- Forks
- 613
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 39
Description
While playing around using rustc internals as a library I found it was pretty difficult to discover how to do a bunch of "common" operations. We might be able to improve discoverability by documenting these in an appendix.
Off the top of my head, it'd be nice to know how to:
- Get the fully qualified name of a type given its HIR representation and location (e.g.
c_char->libc::c_charorstd::os::raw::c_char, depending on context) - Get a
Pathfor a givenItem - Find the DefId of a function or struct declaration
- How to pretty-print a function declaration
Feel free to add other "common" questions or shortcuts in the comments and I'll update this list accordingly.
CC: #74
Contributor guide
No contributing guide indexed for this repository
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 by reviewing the rustc-dev-guide documentation and the four operations listed in this issue: qualified names, Paths, DefIds, and pretty-printing declarations. Check the comments for additional common questions; done means adding an appendix that documents these operations and any agreed additions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100