-
Notifications
You must be signed in to change notification settings - Fork 21
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
Prefer using rustc_middle::ty
types over rustc_hir
ones
#852
Comments
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days. |
Still relevant |
List of types we can migrate this way:
After that, the most powerful change we could do would be to migrate from List of `hir::*` types that are only used transitively by one of the above types:
|
A number of rustc types have two versions: one in the HIR, the other in
rustc_middle::ty
. For exampleGenericParam
vsGenericParamDef
orWherePredicate
vsPredicate
. The HIR version is more syntactic, thety
version is more semantic.We often copy both versions in the frontend, because they happen to show up in other types we need. I propose that when possible we substitute the
ty
version for the HIR one, as I suspect thety
ones are more convenient to use for our purposes.The text was updated successfully, but these errors were encountered: