Commit graph

19628 commits

Author SHA1 Message Date
Yoshua Wuyts
987ab1feda implement feedback from review 2021-10-14 18:19:20 +02:00
Yoshua Wuyts
68ffe91526 Add support for tuple structs 2021-10-14 14:18:12 +02:00
Yoshua Wuyts
8b6ea8ee86 Update label names 2021-10-14 13:52:31 +02:00
Yoshua Wuyts
680dd9d952 Enable delegation generation for complex types 2021-10-14 13:23:46 +02:00
Yoshua Wuyts
c9882c8002 Get a make version working! 2021-10-14 12:34:31 +02:00
Yoshua Wuyts
efb4d45ebc Update generate_delegate.rs 2021-10-13 23:59:23 +02:00
Yoshua Wuyts
c14a12edd7 create function 2021-10-13 20:13:36 +02:00
Ryan Levick
0ff89deb69 Add basic support for delegation 2021-10-13 18:05:09 +02: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
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
bors[bot]
ed4b312fa7
Merge #10514
10514: internal: clean up code duplication r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-10 18:09:13 +00:00
Aleksey Kladov
d4d67406d7 internal: clean up code duplication 2021-10-10 21:08:10 +03:00
bors[bot]
4d80fd1b1b
Merge #10513
10513: minor: align code to code style r=matklad a=matklad

(mutually recursive) data type definitions shall be at the start of the
file.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-10 16:13:59 +00:00
Aleksey Kladov
d28a6c36e1 minor: align code to code style
(mutually recursive) data type definitions shall be at the start of the
file.
2021-10-10 19:13:05 +03:00
bors[bot]
079e9fe496
Merge #10512
10512: internal: add integrated test for token censoring r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-10 13:52:45 +00:00
Aleksey Kladov
634f047d90 internal: add integrated test for token censoring 2021-10-10 16:52:21 +03:00