Commit Graph

18078 Commits

Author SHA1 Message Date
Lukas Wirth
254e8f38d0 Record attributes in attr_query for proc-macros 2021-06-28 19:16:38 +02:00
bors[bot]
ae4279b73f
Merge #9420
9420: fix: Make hover on attribute paths work again r=Veykril a=Veykril

Unfortunately not (yet) unit-testable I believe

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-28 17:08:08 +00:00
Lukas Wirth
9957220dfe Fix NameRef::classify path resolution inside attributes 2021-06-28 19:07:23 +02:00
Milo
443d2164ef remove unneeded ifs 2021-06-28 17:52:57 +01:00
Milo
2e60908fde check if counts should be a thing 2021-06-28 17:50:24 +01:00
Milo
5282617127 trailing line 2021-06-28 17:49:19 +01:00
bors[bot]
9ef62b0ccd
Merge #9418
9418: internal: Include `self` in usage search for modules in their definition source r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-28 14:42:22 +00:00
Lukas Wirth
34c28c1bbc Include self in usage search for modules in their definition source 2021-06-28 16:41:35 +02:00
Milo
d1821e4b6e fix all reviews 2021-06-28 07:31:54 +01:00
bors[bot]
36a49e5da4
Merge #9415
9415: minor: Avoid redundant clone r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-06-28 06:29:10 +00:00
Laurențiu Nicola
cc54d2bbc6 Avoid redundant clone 2021-06-28 09:28:31 +03:00
bors[bot]
1fa82adfdc
Merge #9413
9413: internal: Deduplicate ast expression walking logic r=Veykril a=Veykril

Deduplicates the duplication introduced in #9375 and #9396 while also fixing a few bugs in both the assist and related highlighting.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-26 23:16:38 +00:00
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