aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/test_db.rs
Commit message (Collapse)AuthorAgeFilesLines
* internal: remove def-level diagnostics testsAleksey Kladov2021-06-131-148/+4
|
* clippy::useless_conversionMaan20032021-06-131-1/+1
|
* Make it opt-inJonas Schievink2021-06-031-1/+8
|
* Diagnose unimplemented built-in macrosJonas Schievink2021-05-301-0/+7
|
* Stop expanding UseTrees during ItemTree loweringJonas Schievink2021-05-261-3/+5
|
* internal: move diagnostics to hirAleksey Kladov2021-05-251-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 submodulesJonas Schievink2021-04-171-2/+49
|
* Allow include! an empty content fileEdwin Cheng2021-04-031-0/+13
|
* Simplify hir_def TestDBJonas Schievink2021-03-131-7/+2
|
* Add `TestDB::module_at_position`Jonas Schievink2021-02-091-4/+95
|
* Remove redundant clonesYoshua Wuyts2021-02-051-1/+1
|
* Create all `ModuleId`s through a `DefMap` methodJonas Schievink2021-01-251-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 privateJonas Schievink2021-01-201-3/+3
|
* Introduce anchored_pathAleksey Kladov2020-12-091-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 Schievink2020-12-081-9/+3
|
* Handle macros in `TestDB::check_diagnostics`Jonas Schievink2020-12-081-2/+9
|
* Deny unreachable-pubAleksey Kladov2020-11-021-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 bodiesJonas Schievink2020-10-231-3/+41
|
* Add annotation-based nameres diagnostic testsJonas Schievink2020-09-161-0/+42
|
* Rename ra_hir_def -> hir_defAleksey Kladov2020-08-131-0/+101