internal: Build source map for hir_def::TypeRef
s
#18074
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So that given a
TypeRef
we will be able to trace it back to source code.This is necessary to be able to provide diagnostics for lowering to chalk tys, since the input to that is
TypeRef
. This is the first step towards diagnostics for ty lowering. The next steps will be smaller :PThis means that
TypeRef
s now have an identity, which means storing them in arena and not interning them, which is an unfortunate (but necessary) loss but also a pretty massive change. Luckily, because of the separation layer we have for IDE and HIR, this change never crosses the IDE boundary.This gives an unfortunate regression of ~170mb in
analysis-stats .
.Sorry for the size of the PR; I did some extra things but they are trivial - most of the code is necessary and impossible to split.