Lukas Wirth
3ce5c66ca1
Deduplicate ast expression walking logic
2021-06-27 01:11:57 +02:00
bors[bot]
ddce8b6033
Merge #9408
...
9408: intenral: small improvements to compile time r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-25 20:53:32 +00:00
Aleksey Kladov
93e3659194
intenral: small improvements to compile time
...
AsRef-polymorphism has compile-time cost.
2021-06-25 23:51:54 +03:00
bors[bot]
9552d79f63
Merge #9402
...
9402: internal: add cloning macro fixture r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-25 20:38:18 +00:00
Aleksey Kladov
c27fdc75fa
internal: add cloning macro fixture
...
Macro that deep clone the tokens but otherwise preserves source
locations and hygiene info is an interesting case for IDE support. Lets
have this, although we don't actively use it at the moment.
2021-06-25 23:37:55 +03:00
bors[bot]
2ac1ffc0f3
Merge #9400
...
9400: fix: Fix renaming associated trait items with colliding names r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-25 01:48:50 +00:00
Lukas Wirth
942eeb2f55
Fix renaming associated trait items with colliding names
2021-06-25 03:45:41 +02:00
bors[bot]
c8d0ca8080
Merge #9398
...
9398: minor: Complete `macro_use` attribute on modules r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 20:21:20 +00:00
Lukas Wirth
63b1394b70
Complete macro_use
attribute on modules
2021-06-24 22:20:56 +02:00
bors[bot]
83fc0db7e2
Merge #9397
...
9397: fix: Fix break point highlighting not considering outer labels r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 19:15:59 +00:00
Lukas Wirth
67075b228e
Fix break point highlighting not considering outer labels
2021-06-24 21:14:43 +02:00
bors[bot]
0f0dbdc7d1
Merge #9396
...
9396: feat: Highlight loop break points r=Veykril a=Veykril
![Code_HmWQMlioKr](https://user-images.githubusercontent.com/3757771/123318732-d47be280-d52f-11eb-8a9a-cb3f591d4195.png )
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 19:05:41 +00:00
Lukas Wirth
42efd211bc
Highlight label value block tails
2021-06-24 21:01:37 +02:00
Lukas Wirth
543f925353
Highlight loop break points
2021-06-24 20:57:02 +02:00
bors[bot]
264716e827
Merge #9375
...
9375: feat: Highlight exit and yield points r=Veykril a=Veykril
![Code_YBHOCF3DbU](https://user-images.githubusercontent.com/3757771/123128986-e1270a80-d44b-11eb-9854-065459a2dd50.png )
![Code_YyMhqES0LX](https://user-images.githubusercontent.com/3757771/123128988-e1bfa100-d44b-11eb-9c81-6a6031aad740.png )
Fixes #4691
Fixes #9365
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 15:23:25 +00:00
Lukas Wirth
d77655e5c3
Refine tail exit point highlighting to highlight inner tails
2021-06-24 17:19:27 +02:00
Lukas Wirth
d049783b5d
Simplify
2021-06-24 16:50:56 +02:00
Lukas Wirth
066bc4f3a4
Simplify
2021-06-24 01:32:56 +02:00
bors[bot]
b656751536
Merge #9380
...
9380: feat: Implement goto_declaration support r=matklad a=Veykril
This is just a simple implementation that falls back to `goto_definition` for everything but modules where it goes to the actual module declaration if possible.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-23 22:33:05 +00:00
Lukas Wirth
37d417868e
move goto_declaration fall back into handlers
2021-06-24 00:26:08 +02:00
bors[bot]
85a59de39f
Merge #9353
...
9353: Include extra targets when the pkg_root is not the same as the target root. r=matklad a=rezural
Fixes #7715
For example, if a sub-crate includes sets the path='../somewhere-else/lib.rs', the files will not be in pkg_root , but in the target root's parent.
It may actually be in root.parent().parent(), I'm not sure about that.
At the moment it is just a fix, are there any relevant tests that this could go in? I've got about 1 brain cell left... but im happy to add tests where appropriate.
Co-authored-by: rezural <rezural@protonmail.com>
2021-06-23 21:33:30 +00:00
bors[bot]
1deb1d3209
Merge #9390
...
9390: fix: Improve type bound completions r=Veykril a=Veykril
Closes #9389
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-23 17:14:37 +00:00
Lukas Wirth
85736f2dc9
Fix incorrect base fixture in ide_completion tests
2021-06-23 19:13:27 +02:00
Lukas Wirth
9abd28ac37
Restrict type bound completions to traits, modules and macros
2021-06-23 19:10:03 +02:00
Lukas Wirth
d4877ae992
Add predicate tests for ide_completions
2021-06-23 18:58:19 +02:00
Lukas Wirth
dc4876d33d
Lift out base item fixture for ide_completion tests
2021-06-23 18:37:47 +02:00
Lukas Wirth
511ae17d07
Improve feature docs for highlight_related
2021-06-23 18:11:48 +02:00
Lukas Wirth
f283fce594
Mark (method-)calls with never type as exit points
2021-06-23 17:21:47 +02:00
Lukas Wirth
cc791538d6
Simplify
2021-06-23 17:05:00 +02:00
Lukas Wirth
12266d5e56
Strip leading whitespace from test ouput in references
2021-06-23 16:49:36 +02:00
Lukas Wirth
e406140f38
Implement exit point highlighting
2021-06-23 16:43:53 +02:00
Lukas Wirth
9a53f1033e
Implement yield point highlighting
2021-06-23 16:16:32 +02:00
Lukas Wirth
14b66bb458
Rename 'document_highlight' to 'highlight_related'
2021-06-23 15:13:48 +02:00
Lukas Wirth
b26a8ecca1
Move document highlighting computation from rust-analyzer to ide
2021-06-23 15:02:49 +02:00
bors[bot]
3381c2e4a8
Merge #9031
...
9031: Add `public` semantic token modifier for public items r=Veykril a=arzg
Closes #8943 .
Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2021-06-22 23:58:59 +00:00
Aramis Razzaghipour
3e7472f76c
Add public
semantic token modifier for public items
2021-06-23 09:40:04 +10:00
bors[bot]
3762cb4535
Merge #9383
...
9383: internal: Rewrite token tree lowering to use an explicit stack r=jonas-schievink a=jonas-schievink
Part of https://github.com/rust-analyzer/rust-analyzer/issues/9358 , this fixes the first cause of the stack overflow there. Unfortunately we now run into a stack overflow in the parser.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-22 22:28:43 +00:00
Jonas Schievink
c6669776e1
Rewrite convert_tokens
to use an explicit stack
2021-06-23 00:21:11 +02:00
Jonas Schievink
6504c3c32a
Move subtree collection out of TokenConvertor
2021-06-23 00:19:54 +02:00
bors[bot]
38da41ea6e
Merge #9381
...
9381: Fix compilation on WASM r=matklad a=flodiebold
Fixes #9214 .
Fixes #9210 .
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-06-22 20:01:34 +00:00
Florian Diebold
c61fee6d55
Fix compilation on WASM
...
Fixes #9214 .
Fixes #9210 .
2021-06-22 22:01:06 +02:00
Lukas Wirth
5a74e93c33
Implement goto_declaration support
2021-06-22 20:49:07 +02:00
bors[bot]
9b29573a4b
Merge #9379
...
9379: internal: remove one more accidentally quadratic code-path r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-22 18:26:30 +00:00
Aleksey Kladov
7be2d2f008
internal: remove one more accidentally quadratic code-path
...
Definition::visibility was implemented in a rather roundabout way -- by
asking the parent module about the effective visibility.
This is problematic for a couple of reasons:
* first, it doesn't work for local items
* second, asking module about visibility of a child is a linear
operation (that's a problem in itself, tracked in #9378 )
Instead, lets ask the declared visibility directly, we have all the code
for it, and need only to actually us it.
2021-06-22 21:26:07 +03:00
bors[bot]
9239943b84
Merge #9377
...
9377: internal: count ItemScopes r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-22 18:03:38 +00:00
Aleksey Kladov
260a24d05e
internal: count ItemScopes
2021-06-22 21:02:08 +03:00
bors[bot]
0e0d77d0a3
Merge #9376
...
9376: minor: clarify naming r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-22 17:57:24 +00:00
Aleksey Kladov
4772cb6b30
minor: clarify naming
2021-06-22 20:56:52 +03:00
bors[bot]
16d83ccbe2
Merge #9374
...
9374: Update crates r=kjeremy a=kjeremy
Drops byteorder
Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-06-22 17:24:57 +00:00
kjeremy
5b6e168928
Update crates
2021-06-22 13:18:48 -04:00