`FnCtxt::body_id` should have type `BodyId`
Open
@valentynkit is already working on this.
Since Jun 30, 2026.
C-cleanup
E-medium
E-mentor
T-compiler
T-types
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
FnCtxt::body_id currently has type LocalDefId. I see a lot of usages of body_id having to convert it to HirId or BodyId, so I think it might be nicer if body_id would have type BodyId (it's easier to go BodyId->HirId->LocalDefId, than the other way around).
If you wan to work on this and have any questions please start a zulip thread in the t-types channel and ping me (@waffle).
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.
Assessment
This issue has not been assessed yet.