rust-lang / rust-lang/rustc-dev-guide
Explain all the stable hashing shenanigans
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.9k
- Forks
- 613
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 39
Description
So rustc is full of these impl_stable_hash_for. What are these for? I originally thought that would be for FxHashMap, but that seems to be wrong (I still need to derive(Hash) to use FxHashMap). So now I am just confused. It would be great if the guide could explain that.
@eddyb said "incremental" but that on its own does not explain much of anything -- why is Hash not good enough? Why do I need a tcx to compute a "stable hash"?
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 locating the guide section covering rustc's impl_stable_hash_for implementations. Explain what stable hashing is used for, why ordinary Hash is insufficient for incremental compilation, and why a tcx is needed; done means the guide answers each of these questions clearly.
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
- 35/100