Jonas Schievink
268f45a099
Record custom derive helpers in DefMap
...
Also clean up proc macro attribute parsing a bit
2021-03-18 19:56:37 +01:00
bors[bot]
d0805c6444
Merge #8091
...
8091: Add test for goto def on proc macro invocation r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7073
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-18 16:24:38 +00:00
Jonas Schievink
4390125314
Add test for goto def on proc macro invocation
2021-03-18 17:24:17 +01:00
bors[bot]
d5eb17ade5
Merge #8089
...
8089: Update info about Eclipse Corrosion r=matklad a=mickaelistria
Co-authored-by: Mickael Istria <mistria@redhat.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-18 15:58:05 +00:00
Aleksey Kladov
670964d802
Update docs/user/manual.adoc
2021-03-18 18:57:44 +03:00
Mickael Istria
c0425cbdbd
Update info about Eclipse Corrosion
2021-03-18 16:22:54 +01:00
bors[bot]
faff44b109
Merge #8088
...
8088: Store an `AstId` for procedural macros r=jonas-schievink a=jonas-schievink
Point `HasSource` to the `ast::Fn`, and go to it in `TryToNav`.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-18 15:13:03 +00:00
Jonas Schievink
c05a1a6e37
Store an AstId
for procedural macros
2021-03-18 16:11:18 +01:00
bors[bot]
3ab9b39dd4
Merge #8087
...
8087: Make MacroDefId's `AstId` mandatory when possible r=jonas-schievink a=jonas-schievink
This makes it clearer (in the type definition) which macros have or don't have an `AstId`
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-18 14:38:04 +00:00
Jonas Schievink
b84efbaacf
Make MacroDefId's AstId
mandatory when possible
2021-03-18 15:37:14 +01:00
bors[bot]
816bc73895
Merge #8085
...
8085: Create AstId for builtin_derive macro in tests r=jonas-schievink a=jonas-schievink
This moves them closer to the builtin_macro tests
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-18 14:15:29 +00:00
Jonas Schievink
4cf36545e6
Create AstId for builtin_derive macro in tests
2021-03-18 15:14:52 +01:00
bors[bot]
d3da042a62
Merge #8082
...
8082: Proper handle inner recursive macro rules cases r=edwin0cheng a=edwin0cheng
Fixes #7645
cc @jonas-schievink
bors r+
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-18 12:25:44 +00:00
Edwin Cheng
13f30e9ef5
Handle inner recursive macro rules cases
2021-03-18 20:19:15 +08:00
Lukas Wirth
d41a1690d2
Track source file IDs in source mapping of Attrs
2021-03-18 13:16:27 +01:00
bors[bot]
80d497e541
Merge #8081
...
8081: Reorganize mbe tests r=edwin0cheng a=edwin0cheng
bors r+
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-18 09:23:54 +00:00
Edwin Cheng
49b876de09
Reorganize mbe tests
2021-03-18 17:22:52 +08:00
bors[bot]
d704750ba9
Merge #8080
...
8080: Change ItemTree API to accomodate creating an ItemTree per block expression r=jonas-schievink a=jonas-schievink
...which won't go through salsa because the AST is already cached anyways
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-18 00:57:48 +00:00
Jonas Schievink
5fbb97a0f0
Rename item_tree
query to file_item_tree
2021-03-18 01:53:37 +01:00
Jonas Schievink
759f8c83e5
Make ItemTreeId
its own type
2021-03-18 01:53:22 +01:00
bors[bot]
5632e61f79
Merge #8079
...
8079: Avoid cloning `CfgOptions` r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-18 00:43:18 +00:00
Jonas Schievink
b5cb2829a4
Avoid cloning CfgOptions
2021-03-18 01:41:38 +01:00
bors[bot]
bda858bba9
Merge #8078
...
8078: Support `#[cfg]` on all associated items r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-18 00:30:11 +00:00
Jonas Schievink
94b3b32c98
Support #[cfg]
on all associated items
2021-03-18 01:28:55 +01:00
bors[bot]
62c059ea74
Merge #8076
...
8076: Add test for self-calling inner function r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/4438 (and duplicates)
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-17 21:33:41 +00:00
Jonas Schievink
a85b32abdc
Add test for self-calling inner function
2021-03-17 22:30:09 +01:00
bors[bot]
afcc0da3a1
Merge #8075
...
8075: Fix `use crate as <name>;` imports r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/4644
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-17 21:25:25 +00:00
Jonas Schievink
a54564378b
Fix use crate as <name>;
imports
2021-03-17 22:24:51 +01:00
bors[bot]
daee133ba1
Merge #8073
...
8073: Improve diagnostic when including nonexistent file r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-17 20:56:37 +00:00
Jonas Schievink
5f80364ede
Improve diagnostic when including nonexistent file
2021-03-17 21:56:09 +01:00
bors[bot]
9d691530d5
Merge #8072
...
8072: Fix "unset `OUT_DIR`" diagnostic when using it in item position r=jonas-schievink a=jonas-schievink
"load out dirs from check" is enabled by default now, but better late than never I guess.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-17 20:42:52 +00:00
Jonas Schievink
c64adfe706
Use first early expansion error during nameres
2021-03-17 21:41:32 +01:00
bors[bot]
bba474bb52
Merge #8071
...
8071: Semantic highlight intradoclinks in documentation r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 20:08:42 +00:00
Lukas Wirth
9763f0a6bd
Semantic highlight intradoclinks in documentation
2021-03-17 21:00:01 +01:00
bors[bot]
ec10835d60
Merge #8069
...
8069: Inject highlight into block doc comments r=Veykril a=Veykril
bors r+
Closes https://github.com/rust-analyzer/rust-analyzer/issues/6873
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 18:20:25 +00:00
Lukas Wirth
37964f9fef
Inject highlight into block doc comments
2021-03-17 19:12:28 +01:00
bors[bot]
4fa56e3ab1
Merge #8068
...
8068: Correctly handle `#[cfg]` on function parameters r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5649
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-17 17:36:13 +00:00
Jonas Schievink
9436436d20
Improve test
2021-03-17 18:35:17 +01:00
Jonas Schievink
ba0e4c745d
Apply #[cfg]
s when computing function signatures
2021-03-17 18:28:27 +01:00
Jonas Schievink
6356ea24dd
Add test for #[cfg]
on function params
2021-03-17 18:28:27 +01:00
Jonas Schievink
622c780a8c
ItemTree: lower attributes on fn parameters
2021-03-17 18:28:27 +01:00
Jonas Schievink
022a0f061e
Correctly parse attributes on fn parameters
2021-03-17 18:28:27 +01:00
bors[bot]
0a64713845
Merge #8067
...
8067: Check whether cursor is on and not between intra doc links in goto_definition r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 16:26:05 +00:00
Lukas Wirth
5481c78f32
Check whether cursor is on and not between intra doc links in goto_definition
2021-03-17 17:24:16 +01:00
bors[bot]
edf11480ce
Merge #8065
...
8065: Better handling of block doc comments r=Veykril a=Veykril
Moves doc string processing to `Attrs::docs`, as we need the indent info from all comments before being able to know how much to strip
Closes #7774
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 16:00:43 +00:00
Lukas Wirth
5734b347dd
Fix incorrect newline emission in Attrs::docs
2021-03-17 17:00:08 +01:00
bors[bot]
baa1999168
Merge #8066
...
8066: Handle `#[cfg]` on call arguments r=jonas-schievink a=jonas-schievink
This resolved the issue reported in this comment: https://github.com/rust-analyzer/rust-analyzer/issues/5649#issuecomment-789424608
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-17 14:12:39 +00:00
Jonas Schievink
cb530e7c97
Handle #[cfg]
on call arguments
2021-03-17 15:10:46 +01:00
Lukas Wirth
ec824a92d0
Better handling of block doc comments
2021-03-17 14:48:57 +01:00
bors[bot]
0fbfab3b45
Merge #8059
...
8059: Move doc-comment highlight injection from AST to HIR r=matklad,jonas-schievink a=Veykril
Fixes #5016
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 11:13:54 +00:00