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.