Commit Graph

11 Commits

Author SHA1 Message Date
Jonas Schievink
27f77060e2 Add TestDB::module_at_position 2021-02-09 17:22:57 +01:00
Yoshua Wuyts
79d103d5b4 Remove redundant clones 2021-02-05 16:57:26 +01:00
Jonas Schievink
5c241b0766 Create all ModuleIds through a DefMap method
`ModuleId` needs to be able to represent blocks, and only the
associated `DefMap` will know how to construct that `ModuleId`
2021-01-25 15:21:33 +01:00
Jonas Schievink
0587b99fde Make public DefMap fields private 2021-01-20 15:41:18 +01:00
Aleksey Kladov
6e24321e45 Introduce anchored_path
They allow to represent paths like `#[path = "C:\path.rs"] mod foo;`
in a lossless cross-platform & network-transparent way.
2020-12-09 19:07:05 +03:00
Jonas Schievink
306c6cbaac Use original_file_range in TestDB 2020-12-08 19:03:24 +01:00
Jonas Schievink
678c74430b Handle macros in TestDB::check_diagnostics 2020-12-08 17:16:18 +01:00
Aleksey Kladov
b610118453 Deny unreachable-pub
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.
2020-11-02 14:07:08 +01:00
Jonas Schievink
93dc6f511b Diagnose #[cfg]s in bodies 2020-10-23 19:27:04 +02:00
Jonas Schievink
f792bc7ddd Add annotation-based nameres diagnostic tests 2020-09-16 17:26:51 +02:00
Aleksey Kladov
b28c54a2c2 Rename ra_hir_def -> hir_def 2020-08-13 16:29:33 +02:00