Jonas Schievink
519d870c11
Don't store SyntaxNodePtr
in CrateDefMap
...
It is volatile across reparses and makes incrementality worse.
2020-11-26 17:29:09 +01:00
Jonas Schievink
74cb3e96a5
Test def map invalidation with #[cfg] below change
2020-11-26 17:28:00 +01:00
Aleksey Kladov
2b108133ac
Don't stack overflow on circular modules
...
closes #6453
2020-11-04 15:31:35 +01:00
bors[bot]
8ad01d863b
Merge #6435
...
6435: Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot. r=matklad a=rickvanprim
Updates `module_resolution_relative_path_outside_root` test to check valid paths outside of the root, by moving the root to a subpath so that paths outside of it are possible. If this would be more appropriate as a new test, or if the original check for an invalid path should be left, I'm happy to update.
Co-authored-by: James Leitch <rickvanprim@gmail.com>
2020-11-03 16:36:34 +00:00
James Leitch
ff87726074
Feedback.
2020-11-02 10:57:31 -07: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
James Leitch
d2d7a4403c
Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot.
2020-11-01 17:20:55 -07:00
Jonas Schievink
cd3c632cfc
Handle #![cfg] in crate root
2020-10-26 16:04:08 +01:00
Jonas Schievink
93dc6f511b
Diagnose #[cfg]s in bodies
2020-10-23 19:27:04 +02:00
Jonas Schievink
3421b645e6
Emit better #[cfg] diagnostics
2020-10-22 19:19:18 +02:00
Jonas Schievink
80d2741401
Add a (hint) diagnostic for unconfigured items
2020-10-20 17:53:04 +02:00
Jonas Schievink
8ab7696acd
Account for proc macro helpers when parsing attr
2020-10-05 23:41:16 +02:00
Jonas Schievink
e88e4fbb7b
Add more comments about proc macro resolution
2020-09-28 13:02:28 +02:00
Jonas Schievink
baab72e611
Reduce visibility of non-proc-macros
...
proc-macro crates only export proc-macros, but currently other items
are also considered public (and show up in completion)
2020-09-18 17:50:04 +02:00
Jonas Schievink
069045015c
Remove obsolete proc macro collection code
...
The new attribute-based resolution takes care of this
2020-09-18 16:52:24 +02:00
Jonas Schievink
5486b70bc0
Use hir_def to resolve proc macros
2020-09-18 16:43:50 +02:00
Jonas Schievink
dfa3a3f017
Add test
2020-09-18 16:37:12 +02:00
Jonas Schievink
9dc0afe854
Rename CustomDerive
to ProcMacro
...
It handles fn-like macros too, and will handle attribute macros in the
future
2020-09-18 15:37:31 +02:00
Jonas Schievink
700a3d5d75
Invert condition to unindent code
2020-09-18 12:32:07 +02:00
Jonas Schievink
6eea06415d
Give ExternCrate
a Name
, not a ModPath
2020-09-17 15:28:23 +02:00
Jonas Schievink
0dca7acf0f
Don't diagnose imports whose base crate is missing
2020-09-17 14:48:17 +02:00
Jonas Schievink
f792bc7ddd
Add annotation-based nameres diagnostic tests
2020-09-16 17:26:51 +02:00
Jonas Schievink
4785162b08
Track import sources and emit diagnostics
2020-09-16 17:26:51 +02:00
Jonas Schievink
4ac9a2e5d3
Leave extern crate items unresolved if they are
2020-09-16 17:26:51 +02:00
Jonas Schievink
2a9a66d254
Add diagnostic types for unresolved crates/imports
2020-09-16 17:26:51 +02:00
Jonas Schievink
f3ac19e8cd
Support extern types
2020-08-24 22:02:55 +02:00
Aleksey Kladov
b0fd3faf36
Switch to expect_test from crates.io
2020-08-21 13:19:31 +02:00
Aleksey Kladov
b28c54a2c2
Rename ra_hir_def -> hir_def
2020-08-13 16:29:33 +02:00