Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | internal: move diagnostics to hir | Aleksey Kladov | 2021-05-25 | 1 | -19/+64 |
| | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | Fix `TestDB::module_at_position` with submodules | Jonas Schievink | 2021-04-17 | 1 | -2/+49 |
| | |||||
* | Allow include! an empty content file | Edwin Cheng | 2021-04-03 | 1 | -0/+13 |
| | |||||
* | Simplify hir_def TestDB | Jonas Schievink | 2021-03-13 | 1 | -7/+2 |
| | |||||
* | Add `TestDB::module_at_position` | Jonas Schievink | 2021-02-09 | 1 | -4/+95 |
| | |||||
* | Remove redundant clones | Yoshua Wuyts | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | Create all `ModuleId`s through a `DefMap` method | Jonas Schievink | 2021-01-25 | 1 | -3/+3 |
| | | | | | `ModuleId` needs to be able to represent blocks, and only the associated `DefMap` will know how to construct that `ModuleId` | ||||
* | Make public DefMap fields private | Jonas Schievink | 2021-01-20 | 1 | -3/+3 |
| | |||||
* | Introduce anchored_path | Aleksey Kladov | 2020-12-09 | 1 | -3/+3 |
| | | | | | They allow to represent paths like `#[path = "C:\path.rs"] mod foo;` in a lossless cross-platform & network-transparent way. | ||||
* | Use `original_file_range` in `TestDB` | Jonas Schievink | 2020-12-08 | 1 | -9/+3 |
| | |||||
* | Handle macros in `TestDB::check_diagnostics` | Jonas Schievink | 2020-12-08 | 1 | -2/+9 |
| | |||||
* | Deny unreachable-pub | Aleksey Kladov | 2020-11-02 | 1 | -7/+7 |
| | | | | | | | | It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034. | ||||
* | Diagnose #[cfg]s in bodies | Jonas Schievink | 2020-10-23 | 1 | -3/+41 |
| | |||||
* | Add annotation-based nameres diagnostic tests | Jonas Schievink | 2020-09-16 | 1 | -0/+42 |
| | |||||
* | Rename ra_hir_def -> hir_def | Aleksey Kladov | 2020-08-13 | 1 | -0/+101 |