-
Notifications
You must be signed in to change notification settings - Fork 549
Open
Labels
A-contributor-onboardingArea: contributor on-boarding advice (e.g. for new contributors)Area: contributor on-boarding advice (e.g. for new contributors)A-examplesArea: examplesArea: examplesC-enhancementCategory: enhancementCategory: enhancementE-help-wantedCall for participation: extra help is wantedCall for participation: extra help is wantedE-mediumDifficulty: might require some prior knowledge or code readingDifficulty: might require some prior knowledge or code readingT-compilerRelevant to compiler teamRelevant to compiler team
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_char
orstd::os::raw::c_char
, depending on context) - Get a
Path
for 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
mark-i-m and kkysen
Metadata
Metadata
Assignees
Labels
A-contributor-onboardingArea: contributor on-boarding advice (e.g. for new contributors)Area: contributor on-boarding advice (e.g. for new contributors)A-examplesArea: examplesArea: examplesC-enhancementCategory: enhancementCategory: enhancementE-help-wantedCall for participation: extra help is wantedCall for participation: extra help is wantedE-mediumDifficulty: might require some prior knowledge or code readingDifficulty: might require some prior knowledge or code readingT-compilerRelevant to compiler teamRelevant to compiler team