Commit Graph

19636 Commits

Author SHA1 Message Date
Lukas Wirth
e329b7742b Reorder CompletionContext functions 2021-10-17 11:15:56 +02:00
Lukas Wirth
791a2afbf9 Don't turn local names into strings in CompletionContext 2021-10-17 10:59:06 +02:00
Lukas Wirth
81ccebf1f2 internal: Refactor lifetime completion context fields 2021-10-16 23:56:57 +02:00
Lukas Wirth
2fbd52c78f fix: Fix qualified path completion not completing macros 2021-10-16 23:33:09 +02:00
bors[bot]
f87debcf87
Merge #10434
10434: Allow `Locate parent module` command in Cargo.toml r=Veykril a=rainy-me

close #10355

Co-authored-by: rainy-me <github@rainy.me>
Co-authored-by: rainy-me <github@yue.coffee>
2021-10-14 10:56:08 +00:00
bors[bot]
641fa374ed
Merge #10309
10309: use `ControlFlow` in "extract function" assist r=Veykril a=dzvon

Fixes #10272 

Co-authored-by: Dezhi Wu <wu543065657@163.com>
2021-10-14 10:47:11 +00:00
bors[bot]
7d1015b8d1
Merge #10537
10537: minor: Document rustc source auto-discovery r=lnicola a=lnicola

CC #10521

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-10-14 05:57:31 +00:00
Laurențiu Nicola
e43e1240a7 Document rustc source auto-discovery 2021-10-14 08:57:07 +03:00
rainy-me
59c755227d Provide navigations to parent modules 2021-10-14 07:16:42 +09:00
Dezhi Wu
214e7cc69d merge use statement 2021-10-13 21:24:17 +08:00
Dezhi Wu
93ae993ec4 resolve ControlFlow ourself instead of hard coding. 2021-10-13 21:19:41 +08:00
bors[bot]
1619fa9d8f
Merge #10534
10534: Made Rust analyzer logos dark mode friendly r=lnicola a=Permik

Hi! Here's a list of changes what I made to the logos to make them dark mode friendly:

* Simplified the letter R in both logos for strokes to play nice
* Added white stroke around the dark letters about the same weight as the light gray stroke around the rectangle/square

Extra, that is nice but doesn't really matter:
* Simplified the dots in the logo to be circles, not paths

Co-authored-by: Santtu Ojanperä <tintti214@gmail.com>
2021-10-13 13:13:00 +00:00
bors[bot]
e24429f31b
Merge #10536
10536: minor: Make AssistContext::frange private r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-13 12:41:25 +00:00
Lukas Wirth
ccad89a2db Make AssistContext::frange private 2021-10-13 14:39:37 +02:00
Dezhi Wu
5818358bbf import ControlFlow to the module 2021-10-13 09:09:07 +08:00
Dezhi Wu
f888e85f79 use ControlFlow::Break(_) pattern 2021-10-13 09:06:47 +08:00
Dezhi Wu
971a271840 use ControlFlow in "extract function" assist 2021-10-13 09:06:47 +08:00
Santtu Ojanperä
0ab1768401 Simplified the dot in the wide logo 2021-10-13 01:41:12 +03:00
Santtu Ojanperä
6436bd1aaa Made the Rust analyzer logos more dark mode friendly 2021-10-13 01:22:47 +03:00
bors[bot]
137ac67f5d
Merge #10533
10533: fix: Fix AssistContext panic on sole whitespace selection r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-12 19:29:47 +00:00
Lukas Wirth
086563f751 Fix AssistContext panic on sole whitespace selection 2021-10-12 21:29:08 +02:00
bors[bot]
f185d1c533
Merge #10423
10423: Internal: refactor for mdbook plugin r=Veykril a=HKalbasi

This PR is for upstreaming changes that I made for mdbook plugin. Changes are adding inlay hints to `StaticIndex` and changing some functions for working around privacy of crates.

Aside this, is it okay if I bring the plugin in tree? It is a simple binary crate. I feel it will better maintained here and become resistant to api changes.

Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2021-10-12 18:35:03 +00:00
bors[bot]
a871da3693
Merge #10529
10529: Generate `PartialOrd` implementations r=Veykril a=yoshuawuyts

_co-authored with `@rylev_`

This closes #5946 (which should've been closed already, lol). This PR makes it so we generate `PartialOrd` code implementations where possible. This is the last of Rust's built-in traits that was missing codegen.

After this has been merged we should look at moving the tests to a better spot, and maybe cleaning up the implementation somewhat (it's rather copy-pasty at the moment).

Either way, this finishes up the functionality. Thanks heaps!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2021-10-12 17:32:58 +00:00
bors[bot]
d56c8796d6
Merge #10532
10532: Rename `descend_into_macros` Function per FIXME comment r=Veykril a=mirkoRainer

This renames `descend_into_macros` to  `descend_into_macros_single` and `descend_into_macros_many` into `descend_into_macros`.
 However, this does not touch a function in `SemanticsImpl` of same name.

I was prompted to do this per a FIXME comment, which is removed in this PR.

Co-authored-by: Mirko Rainer <mirkorainer@outlook.com>
2021-10-12 17:24:50 +00:00
Mirko Rainer
eccfa1645b Saw a FIXME comment and decided to fix it.
This renames `descend_into_macros` to  `descend_into_macros_single` and `descend_into_macros_many` into `descend_into_macros`.
 However, this does not touch a function in `SemanticsImpl` of same name.
2021-10-12 11:52:31 -04:00
Yoshua Wuyts
601ed3a10d Simplify generated PartialOrd code 2021-10-12 17:44:57 +02:00
Yoshua Wuyts
5f72bd81a9 impl PartialOrd codegen for tuple enum 2021-10-12 17:05:59 +02:00
Yoshua Wuyts
77b5fe6c52 impl PartialOrd codegen for record enum 2021-10-12 17:05:59 +02:00
Yoshua Wuyts
95eff43cc1 impl PartialOrd codegen for C-style enums 2021-10-12 17:05:58 +02:00
Yoshua Wuyts
c0263fb07a impl PartialOrd codegen for struct records 2021-10-12 17:05:58 +02:00
Yoshua Wuyts
6941fdc49f impl PartialOrd codegen for tuple records 2021-10-12 17:05:58 +02:00
Yoshua Wuyts
bc6aee51b0 init partialord 2021-10-12 17:05:58 +02:00
bors[bot]
5e8f4dc30d
Merge #10530
10530: Add link to ECS acronym to clarify. r=lnicola a=mirkoRainer

I had to ask a clarifying question about this acronym. If I had the question, it's likely that someone else will also have the question so I wanted to clarify.

Co-authored-by: Mirko Rainer <mirkorainer@outlook.com>
2021-10-12 13:26:38 +00:00
Mirko Rainer
a1c544f85a Add link to ECS acronym to clarify. 2021-10-12 09:24:00 -04:00
bors[bot]
be9e7f9aaf
Merge #10528
10528: internal: Make selections in assists with trailing/leading whitespace more forgiving r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-12 12:42:36 +00:00
Lukas Wirth
03fcf1b246 Make selections in assists with trailing/leading whitespace more forgiving 2021-10-12 14:41:59 +02:00
bors[bot]
64b1c72af2
Merge #10526
10526: internal: Improve user snippet import performance r=Veykril a=Veykril

Re-using the `GreenNode` should be a good chunk faster than reparsing the paths on each completion
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-12 09:49:02 +00:00
Lukas Wirth
66bfa6fc88 Improve user snippet import performance 2021-10-12 11:48:37 +02:00
hamidreza kalbasi
0f49c97e93 internal changes for mdbook 2021-10-12 11:54:00 +03:30
bors[bot]
1cca1fa5bf
Merge #10525
10525: Regenerate lints and features r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-12 07:56:00 +00:00
Lukas Wirth
22f471d81f Update tidy ignore path 2021-10-12 09:47:21 +02:00
Lukas Wirth
acaf270911 Remove stale module 2021-10-12 09:37:16 +02:00
Lukas Wirth
d71a4f40d9 Regenerate lints 2021-10-12 09:35:02 +02:00
Lukas Wirth
ed7c2948b3 Move lint source generator 2021-10-12 08:59:39 +02:00
bors[bot]
098284aec8
Merge #10522
10522: fix: make signature info response conform to spec r=lnicola a=muscar

This addreses https://github.com/rust-analyzer/rust-analyzer/issues/10464.

This patch picks up `lsp-types` 0.90.1, which serialises the `SignatureInformation` and `ParameterInformation` with the right casing. It also adds `activeSignature` field as part of the top-level signature response. It keeps `activeParameter` at the top-level for backwards compatibility.

Co-authored-by: Alex Muscar <alex@muscar.eu>
2021-10-11 19:58:27 +00:00
bors[bot]
f6cb33055b
Merge #10523
10523: minor: Simplify and add a few doc comments r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-11 19:51:35 +00:00
Lukas Wirth
5ccaff3c97 Simplify 2021-10-11 21:49:50 +02:00
Alex Muscar
41856e2682 fix: make signature info response conform to spec
This addreses
https://github.com/rust-analyzer/rust-analyzer/issues/10464.

This patch picks up `lsp-types` 0.90.1, which serialises the
`SignatureInformation` and `ParameterInformation` with the right casing.
It also adds `activeSignature` field as part of the top-level signature
response. It keeps `activeParameter` at the top-level for backwards
compatibility.
2021-10-11 20:42:16 +01:00
bors[bot]
1e9ecb9f58
Merge #10519
10519: Add toolInfo in MetaData vertex in LSIF dumps r=lnicola a=sandhose

This helps with uploading LSIF dumps to Sourcegraph without having to specify an indexer name.

Fixes #10518 

Co-authored-by: Quentin Gliech <quentingliech@gmail.com>
2021-10-11 12:51:53 +00:00
Quentin Gliech
824b7a8564
Add toolInfo in MetaData vertex in LSIF dumps
This helps with uploading LSIF dumps to Sourcegraph without having to
specify an indexer name.
2021-10-11 14:45:58 +02:00