Skip to content

Request: expose stable hash value for DefId #102

Description

@zjp-CN

TyCtxt::def_path_hash provides stable hash value for DefId.

A stable hash is important for cross-platform or cache-sensitive code.

To keep API simple, instead of returning DefPathHash, the hash value can just be two u64s.


Updated: it seems DefPathHash is also platform-dependent due to SVH. (Context)
In this case, there is no such stable DefId hash across platforms.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions