Skip to content

Explain all the stable hashing shenanigans #203

Open
@RalfJung

Description

@RalfJung

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"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: incremental compilationC-enhancementCategory: enhancementE-help-wantedCall for participation: extra help is wantedE-mediumDifficulty: might require some prior knowledge or code readingE-needs-writeupCall for participation: discussion can be written up without much research requiredT-compilerRelevant to compiler team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions