Commit Graph

13340 Commits

Author SHA1 Message Date
Anton Firszov
4e16cfbdf4 simple implementation 2021-10-15 13:19:46 +02:00
Anton Firszov
1e303cc035 cursor_inside_simple_match_arm_list -- tests 2021-10-15 12:15:52 +02:00
Anton Firszov
68a50150d6 use ctx.selection_trimmed() instead of ctx.frange.range 2021-10-14 20:45:10 +02:00
Anton Firszov
0a8a56b77a apply formatting recommendations 2021-10-14 20:38:06 +02:00
Anton Firszov
01e3022521 update generated.rs 2021-10-14 20:35:59 +02:00
Anton Firszov
8cca6242f8 make it work from macro 2021-10-14 20:31:33 +02:00
Anton Firszov
fb47a65ab2 apply necessary test changes 2021-10-14 19:31:27 +02:00
Anton Firszov
a17a132617 Narrow add_missing_match_arms assist range 2021-10-14 18:15:00 +02: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]
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
Lukas Wirth
66bfa6fc88 Improve user snippet import performance 2021-10-12 11:48:37 +02:00
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
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
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
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
Aleksey Kladov
634f047d90 internal: add integrated test for token censoring 2021-10-10 16:52:21 +03:00
Aleksey Kladov
a88344152d minor: add a test for derive macros in core 2021-10-10 16:13:45 +03:00
Aleksey Kladov
5af80d8372 internal: move derived tests to the unified macro infra 2021-10-10 16:10:35 +03:00
Aleksey Kladov
55d8be5a24 internal: consistent module naming 2021-10-10 15:44:03 +03:00
Aleksey Kladov
e5acf650d0 move tests 2021-10-10 15:30:54 +03:00
Aleksey Kladov
5f8b708aca move tests 2021-10-10 15:28:24 +03:00
Aleksey Kladov
6a3fc84921 internal: move builtin macro tests to macro expansion suite 2021-10-10 15:17:53 +03:00
Aleksey Kladov
bfc5d8529a drop obsolete tests 2021-10-10 15:11:33 +03:00
Aleksey Kladov
0f849a7a35 move test 2021-10-10 15:06:41 +03:00
Aleksey Kladov
dce41e5a03 move tests 2021-10-10 14:58:25 +03:00
Aleksey Kladov
42fd71e6c8 move tests 2021-10-10 14:40:13 +03:00
Aleksey Kladov
be73cc8f83 move test 2021-10-10 14:28:04 +03:00
Aleksey Kladov
af76db3c36 move tests 2021-10-10 14:26:47 +03:00
Aleksey Kladov
6253213a6e move test 2021-10-10 14:23:52 +03:00
Aleksey Kladov
e55797f59d move tests 2021-10-10 14:21:47 +03:00
Aleksey Kladov
8997d742dc move tests 2021-10-10 14:08:49 +03:00
Aleksey Kladov
464fb9f0d4 add directory for regression tests 2021-10-10 13:56:41 +03:00