aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/diagnostics.rs
Commit message (Collapse)AuthorAgeFilesLines
* internal: refactor unresolved proc macro diagnosticAleksey Kladov2021-06-131-32/+2
|
* internal: refactor inactive code diagnosticsAleksey Kladov2021-06-131-29/+3
|
* internal: refactor unresolved macro call diagnosticAleksey Kladov2021-06-131-26/+9
|
* internal: refactor unresolved import diagnosticAleksey Kladov2021-06-131-25/+2
|
* internal: refactor unresolved extern crate diagnosticAleksey Kladov2021-06-131-21/+2
|
* internal: unified missing fields diagnosticAleksey Kladov2021-06-131-50/+2
|
* internal: move missing_fields diagnosticsAleksey Kladov2021-06-131-41/+2
|
* internal: start new diagnostics APIAleksey Kladov2021-06-131-20/+19
| | | | | | | | | | | | | | | | | | At the moment, this moves only a single diagnostic, but the idea is reafactor the rest to use the same pattern. We are going to have a single file per diagnostic. This file will define diagnostics code, rendering range and fixes, if any. It'll also have all of the tests. This is similar to how we deal with assists. After we refactor all diagnostics to follow this pattern, we'll probably move them to a new `ide_diagnostics` crate. Not that we intentionally want to test all diagnostics on this layer, despite the fact that they are generally emitted in the guts on the compiler. Diagnostics care to much about the end presentation details/fixes to be worth-while "unit" testing. So, we'll unit-test only the primary output of compilation process (types and name res tables), and will use integrated UI tests for diagnostics.
* internal: move diagnostics infra to hirAleksey Kladov2021-06-121-3/+32
|
* Move some hir_ty diagnostics to hirAleksey Kladov2021-06-121-5/+258
|
* internal: move missing unsafe diagnostic to hirAleksey Kladov2021-06-121-0/+24
|
* internal: move inference diagnostics to hirAleksey Kladov2021-06-121-2/+52
|
* Diagnose unimplemented built-in macrosJonas Schievink2021-05-301-0/+24
|
* internal: move diagnostics to hirAleksey Kladov2021-05-251-9/+223
| | | | | | | | | | | | | | | | | | | | | | | The idea here is to eventually get rid of `dyn Diagnostic` and `DiagnosticSink` infrastructure altogether, and just have a `enum hir::Diagnostic` instead. The problem with `dyn Diagnostic` is that it is defined in the lowest level of the stack (hir_expand), but is used by the highest level (ide). As a first step, we free hir_expand and hir_def from `dyn Diagnostic` and kick the can up to `hir_ty`, as an intermediate state. The plan is then to move DiagnosticSink similarly to the hir crate, and, as final third step, remove its usage from the ide. One currently unsolved problem is testing. You can notice that the test which checks precise diagnostic ranges, unresolved_import_in_use_tree, was moved to the ide layer. Logically, only IDE should have the infra to render a specific range. At the same time, the range is determined with the data produced in hir_def and hir crates, so this layering is rather unfortunate. Working on hir_def shouldn't require compiling `ide` for testing.
* Add more docsAleksey Kladov2021-05-221-1/+5
|
* For unresolved macros, hightlight only the last segmentAleksey Kladov2021-02-281-1/+3
|
* Implement fix, add testsPhil Ellison2021-01-231-9/+0
|
* Add diagnostic for filter_map followed by nextPhil Ellison2021-01-231-1/+10
|
* Add fix to wrap return expression in SomePhil Ellison2021-01-071-1/+1
|
* Format codeivan7702020-12-081-1/+1
|
* Remove this semicolonivan7702020-12-081-1/+1
|
* Publish diagnostics for macro expansion errorsJonas Schievink2020-11-271-1/+1
|
* Fill the diagnostic code field in publish_diagnosticsLukas Wirth2020-11-171-1/+3
|
* Rename UnconfiguredCode -> InactiveCodeJonas Schievink2020-10-201-1/+1
|
* Add a (hint) diagnostic for unconfigured itemsJonas Schievink2020-10-201-1/+1
|
* Add fix for incorrect case diagnosticIgor Aleksanov2020-10-121-1/+2
|
* Rename ra_hir -> hirAleksey Kladov2020-08-131-0/+6