Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace HirTyId and MirTypeId with std::hash::Hash implementation #2

Open
junlarsen opened this issue Feb 3, 2025 · 2 comments
Open

Comments

@junlarsen
Copy link
Owner

As long as we manually hash them with the extra "tag" that we use there should be no reason to hold a HirTyId.

Alternatively we can have HirTyId/MirTypeId as a newtype for u64 in case you want to hold the hash.

@junlarsen
Copy link
Owner Author

This might make it possible to remove StableRef all together.

@junlarsen
Copy link
Owner Author

Maybe keep it as-is, because we're going to derive HirTyId values for types that are not yet constructed. For example, computing the HirTyId of a pointer to a given type.

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

No branches or pull requests

1 participant