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.
Goal:
TyId
s of the types for a type mismatch). These enum variants should generally be constructed directly, rather than via constructor functions that might generate strings, etc.to_complete(..) -> CompleteDiagnostic
functions.I scrapped the
LazyDiagnostic
idea that I showed during the meeting, in favor of just moving the diagnostic stuff from the hir crate to the hir-analysis crate, so nowDiagnosticVoucher::to_complete
takes aSpannedHirAnalysisDb
instead of aSpannedHirDb
, etc. Its useful to have concrete span locations when generating the diagnostic text, so we can sort the labels by location and use text like "x
defined first here", "x
redefined here", etc and have it make sense.I'll submit some follow-up PRs that actually improve diagnostics in the future, and to do a little more code shuffling. I'd like to merge this because it touches a lot of lines and could lead to conflict hassles for other stuff.