]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agofix: Adding tuple fields in ADT, chore: test action section
vi_mi [Tue, 12 Oct 2021 07:58:10 +0000 (07:58 +0000)]
fix: Adding tuple fields in ADT, chore: test action section
unindentation

2 years agofix: arbitary noop of assist and same file double writes
vi_mi [Tue, 12 Oct 2021 06:00:15 +0000 (06:00 +0000)]
fix: arbitary noop of assist and same file double writes

2 years agofeat: Adding extract_module assist
vi_mi [Mon, 16 Aug 2021 08:15:10 +0000 (13:45 +0530)]
feat: Adding extract_module assist

2 years agoMerge #10552
bors[bot] [Fri, 15 Oct 2021 17:29:03 +0000 (17:29 +0000)]
Merge #10552

10552: fix: Fix missing_fields diagnostic fix replacing wrong text ranges r=Veykril a=Veykril

Fixes #5393 by replacing the problematic behaviour there with a new "problem"

It replaces the correct range now, but it potentially discards the whitespace in the macro input. This is the best we can do currently until we get a formatter.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFix missing_fields diagnostic fix replacing wrong text ranges
Lukas Wirth [Fri, 15 Oct 2021 17:27:19 +0000 (19:27 +0200)]
Fix missing_fields diagnostic fix replacing wrong text ranges

2 years agoMerge #10543
bors[bot] [Fri, 15 Oct 2021 16:05:15 +0000 (16:05 +0000)]
Merge #10543

10543: Narrow add_missing_match_arms assist range r=Veykril a=antonfirsov

Contributes to #10220 with logic borrowed from #10267.

Note: if anyone has recommendations for further analyzers to check, I'm happy to (hard to do it on my own, I'm completely new to the language).

Co-authored-by: Anton Firszov <antonfir@gmail.com>
2 years agocov_mark for add_missing_match_arms special cases
Anton Firszov [Fri, 15 Oct 2021 15:53:01 +0000 (17:53 +0200)]
cov_mark for add_missing_match_arms special cases

2 years agoundo unnecessary test changes
Anton Firszov [Fri, 15 Oct 2021 12:45:11 +0000 (14:45 +0200)]
undo unnecessary test changes

2 years agocosmetics
Anton Firszov [Fri, 15 Oct 2021 12:36:37 +0000 (14:36 +0200)]
cosmetics

2 years agoupdate generated.rs
Anton Firszov [Fri, 15 Oct 2021 12:30:38 +0000 (14:30 +0200)]
update generated.rs

2 years agofix sample + cosmetics + one more test
Anton Firszov [Fri, 15 Oct 2021 12:14:21 +0000 (14:14 +0200)]
fix sample + cosmetics + one more test

2 years agosimple implementation
Anton Firszov [Fri, 15 Oct 2021 11:19:46 +0000 (13:19 +0200)]
simple implementation

2 years agoMerge #10549
bors[bot] [Fri, 15 Oct 2021 11:16:10 +0000 (11:16 +0000)]
Merge #10549

10549: minor: Update crates r=lnicola a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2 years agoUpdate crates
Jeremy Kolb [Fri, 15 Oct 2021 11:12:30 +0000 (07:12 -0400)]
Update crates

2 years agocursor_inside_simple_match_arm_list -- tests
Anton Firszov [Fri, 15 Oct 2021 10:15:52 +0000 (12:15 +0200)]
cursor_inside_simple_match_arm_list -- tests

2 years agoMerge #10491
bors[bot] [Thu, 14 Oct 2021 22:41:06 +0000 (22:41 +0000)]
Merge #10491

10491: Support nested type on replace if let with match r=k-nasa a=k-nasa

## Why

close: https://github.com/rust-analyzer/rust-analyzer/issues/8690

Now, Replacing if-let with match cant't output exhaustive patterns code.
This was because the `else` conversion used specific types (ex. Option, Result) instead of wildcards.

I thought it was more of a problem to generate non-exhaustive patterns than the benefits of using the concrete one.

How about using wildcards in `else`?
Is this change policy acceptable?

## What

- using wildcards on `make_else_arm`
- Change test cases

Co-authored-by: k-nasa <htilcs1115@gmail.com>
2 years agoMerge #10545
bors[bot] [Thu, 14 Oct 2021 20:10:59 +0000 (20:10 +0000)]
Merge #10545

10545: A few clippy fixes r=Veykril a=Milo123459

A few clippy fixes

Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
2 years agoMerge #10546
bors[bot] [Thu, 14 Oct 2021 19:51:34 +0000 (19:51 +0000)]
Merge #10546

10546: feat: Implement promote_local_to_const assist r=Veykril a=Veykril

Fixes #7692, that is now one can invoke the `extract_variable` assist on something and then follow that up with this assist to turn it into a const.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoImplement promotoe_local_to_const assist
Lukas Wirth [Thu, 14 Oct 2021 19:49:46 +0000 (21:49 +0200)]
Implement promotoe_local_to_const assist

2 years agoa few clippy fixes
Milo [Thu, 14 Oct 2021 18:57:21 +0000 (19:57 +0100)]
a few clippy fixes

2 years agouse ctx.selection_trimmed() instead of ctx.frange.range
Anton Firszov [Thu, 14 Oct 2021 18:45:10 +0000 (20:45 +0200)]
use ctx.selection_trimmed() instead of ctx.frange.range

2 years agoapply formatting recommendations
Anton Firszov [Thu, 14 Oct 2021 18:38:06 +0000 (20:38 +0200)]
apply formatting recommendations

2 years agoupdate generated.rs
Anton Firszov [Thu, 14 Oct 2021 18:35:59 +0000 (20:35 +0200)]
update generated.rs

2 years agomake it work from macro
Anton Firszov [Thu, 14 Oct 2021 18:31:33 +0000 (20:31 +0200)]
make it work from macro

2 years agoMerge #10539
bors[bot] [Thu, 14 Oct 2021 18:16:17 +0000 (18:16 +0000)]
Merge #10539

10539: Add "generate delegate methods" assist r=Veykril a=yoshuawuyts

_Co-authored with `@rylev_.`

This patch adds a new assist: "generate delegate method" which creates a method that calls to a method defined on an inner field. Delegation is common when authoring newtypes, and having IDE support for this is the best way we can make this easier to author in Rust, bar adding language-level support for it. Thanks!

Closes #5944.

## Example

__before__
```rust
struct Age(u8);
impl Age {
    fn age(&self) -> u8 {
        self.0
    }
}

struct Person {
    ag$0e: Age,
}
```

__after__
```rust
struct Age(u8);
impl Age {
    fn age(&self) -> u8 {
        self.0
    }
}

struct Person {
    age: Age,
}

impl Person {
    $0fn age(&self) -> u8 {
        self.age.age()
    }
}
```

Co-authored-by: Ryan Levick <me@ryanlevick.com>
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2 years agoapply necessary test changes
Anton Firszov [Thu, 14 Oct 2021 17:31:27 +0000 (19:31 +0200)]
apply necessary test changes

2 years agofix ret type in generic
Yoshua Wuyts [Thu, 14 Oct 2021 16:33:29 +0000 (18:33 +0200)]
fix ret type in generic

2 years agoimplement feedback from review
Yoshua Wuyts [Thu, 14 Oct 2021 16:19:20 +0000 (18:19 +0200)]
implement feedback from review

2 years agoNarrow add_missing_match_arms assist range
Anton Firszov [Thu, 14 Oct 2021 16:15:00 +0000 (18:15 +0200)]
Narrow add_missing_match_arms assist range

2 years agoAdd support for tuple structs
Yoshua Wuyts [Thu, 14 Oct 2021 12:18:12 +0000 (14:18 +0200)]
Add support for tuple structs

2 years agoMerge #10517
bors[bot] [Thu, 14 Oct 2021 11:57:16 +0000 (11:57 +0000)]
Merge #10517

10517: Show cargo check failures to the user r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10515

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoKill the child process before waiting in streaming_output
Lukas Wirth [Thu, 14 Oct 2021 11:53:25 +0000 (13:53 +0200)]
Kill the child process before waiting in streaming_output

2 years agoUpdate label names
Yoshua Wuyts [Thu, 14 Oct 2021 11:52:31 +0000 (13:52 +0200)]
Update label names

2 years agoMerge #10538
bors[bot] [Thu, 14 Oct 2021 11:50:14 +0000 (11:50 +0000)]
Merge #10538

10538: fix: matching brace should prefer brace on cursor's right r=Veykril a=codgician

I observed a brace matching issue with the following Rust code:

```rust
let x = (1 + (2 + 3)) * 4;
```

In a situation like `<|>(1 + (2 + 3)) * 4`, the cursor will go to `(1 + (2 + 3)<|>) * 4`, and if user tries to match bracket again it will go like  `(1 + <|>(2 + 3)) * 4` while logically the expected result should be `<|>(1 + (2 + 3)) * 4`. This behavior exists in both line cursor style and block cursor style.

This PR fixes this by letting `matching_brace` prefer the brace to cursor's right when the cursor lies between multiple consecutive braces. It **does NOT** fix #1942 but could be related. Please review.

Co-authored-by: codgician <15964984+codgician@users.noreply.github.com>
2 years agoMerge #10503
bors[bot] [Thu, 14 Oct 2021 11:42:53 +0000 (11:42 +0000)]
Merge #10503

10503: Only include targets of packages that are workspace members r=Veykril a=bcully

CargoWorkspace's package list includes packages that are path
dependencies, even if those packages aren't actually members of the
cargo workspace. As a result, rust-analyzer's runnable finder, which
returns the target from the first workspace that has a matching package,
may select the wrong working directory, causing runnables to fail, e.g.,
```
error: package `root` cannot be tested because it requires dev-dependencies and is not a member of the workspace
```

To fix this, we filter out packages that aren't members of the workspace
when searching for targets.

Fixes #7764

Co-authored-by: Brendan Cully <brendan@cully.org>
2 years agoEnable delegation generation for complex types
Yoshua Wuyts [Thu, 14 Oct 2021 11:23:46 +0000 (13:23 +0200)]
Enable delegation generation for complex types

2 years agoMerge #10434
bors[bot] [Thu, 14 Oct 2021 10:56:08 +0000 (10:56 +0000)]
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>
2 years agoMerge #10309
bors[bot] [Thu, 14 Oct 2021 10:47:11 +0000 (10:47 +0000)]
Merge #10309

10309: use `ControlFlow` in "extract function" assist r=Veykril a=dzvon

Fixes #10272

Co-authored-by: Dezhi Wu <wu543065657@163.com>
2 years agoGet a make version working!
Yoshua Wuyts [Thu, 14 Oct 2021 10:34:31 +0000 (12:34 +0200)]
Get a make version working!

2 years agoMatching brace prefers brace on cursor's right
codgician [Thu, 14 Oct 2021 06:15:56 +0000 (14:15 +0800)]
Matching brace prefers brace on cursor's right

2 years agoMerge #10537
bors[bot] [Thu, 14 Oct 2021 05:57:31 +0000 (05:57 +0000)]
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>
2 years agoDocument rustc source auto-discovery
Laurențiu Nicola [Thu, 14 Oct 2021 05:49:22 +0000 (08:49 +0300)]
Document rustc source auto-discovery

2 years agoProvide navigations to parent modules
rainy-me [Wed, 13 Oct 2021 22:16:42 +0000 (07:16 +0900)]
Provide navigations to parent modules

2 years agoUpdate generate_delegate.rs
Yoshua Wuyts [Wed, 13 Oct 2021 21:59:23 +0000 (23:59 +0200)]
Update generate_delegate.rs

2 years agocreate function
Yoshua Wuyts [Wed, 13 Oct 2021 18:13:36 +0000 (20:13 +0200)]
create function

2 years agoAdd basic support for delegation
Ryan Levick [Wed, 13 Oct 2021 13:08:40 +0000 (15:08 +0200)]
Add basic support for delegation

2 years agofix
k-nasa [Wed, 13 Oct 2021 14:07:49 +0000 (23:07 +0900)]
fix

2 years agomerge use statement
Dezhi Wu [Wed, 13 Oct 2021 13:24:17 +0000 (21:24 +0800)]
merge use statement

2 years agoresolve `ControlFlow` ourself instead of hard coding.
Dezhi Wu [Wed, 13 Oct 2021 13:19:41 +0000 (21:19 +0800)]
resolve `ControlFlow` ourself instead of hard coding.

2 years agoMerge #10534
bors[bot] [Wed, 13 Oct 2021 13:13:00 +0000 (13:13 +0000)]
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>
2 years agoupdate calc_depth
k-nasa [Wed, 13 Oct 2021 13:06:53 +0000 (22:06 +0900)]
update calc_depth

2 years agocalc depth
k-nasa [Wed, 13 Oct 2021 13:02:39 +0000 (22:02 +0900)]
calc depth

2 years agoMerge #10536
bors[bot] [Wed, 13 Oct 2021 12:41:25 +0000 (12:41 +0000)]
Merge #10536

10536: minor: Make AssistContext::frange private r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMake AssistContext::frange private
Lukas Wirth [Wed, 13 Oct 2021 12:39:37 +0000 (14:39 +0200)]
Make AssistContext::frange private

2 years agomove test case
k-nasa [Wed, 13 Oct 2021 12:03:01 +0000 (21:03 +0900)]
move test case

2 years agoRevert "Apply make_else_arm to general case"
k-nasa [Wed, 13 Oct 2021 11:36:04 +0000 (20:36 +0900)]
Revert "Apply make_else_arm to general case"

This reverts commit aeee70397e8230117f0097fa8624d59d910bd324.

2 years agoimport `ControlFlow` to the module
Dezhi Wu [Wed, 13 Oct 2021 01:01:30 +0000 (09:01 +0800)]
import `ControlFlow` to the module

2 years agouse `ControlFlow::Break(_)` pattern
Dezhi Wu [Wed, 22 Sep 2021 10:48:47 +0000 (18:48 +0800)]
use `ControlFlow::Break(_)` pattern

2 years agouse `ControlFlow` in "extract function" assist
Dezhi Wu [Wed, 22 Sep 2021 08:00:09 +0000 (16:00 +0800)]
use `ControlFlow` in "extract function" assist

2 years agoSimplified the dot in the wide logo
Santtu Ojanperä [Tue, 12 Oct 2021 22:41:12 +0000 (01:41 +0300)]
Simplified the dot in the wide logo

2 years agoMade the Rust analyzer logos more dark mode friendly
Santtu Ojanperä [Tue, 12 Oct 2021 22:22:47 +0000 (01:22 +0300)]
Made the Rust analyzer logos more dark mode friendly

2 years agoMerge #10533
bors[bot] [Tue, 12 Oct 2021 19:29:47 +0000 (19:29 +0000)]
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>
2 years agoFix AssistContext panic on sole whitespace selection
Lukas Wirth [Tue, 12 Oct 2021 19:29:08 +0000 (21:29 +0200)]
Fix AssistContext panic on sole whitespace selection

2 years agoMerge #10423
bors[bot] [Tue, 12 Oct 2021 18:35:03 +0000 (18:35 +0000)]
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>
2 years agoMerge #10529
bors[bot] [Tue, 12 Oct 2021 17:32:58 +0000 (17:32 +0000)]
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>
2 years agoMerge #10532
bors[bot] [Tue, 12 Oct 2021 17:24:50 +0000 (17:24 +0000)]
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>
2 years agoSaw a FIXME comment and decided to fix it.
Mirko Rainer [Tue, 12 Oct 2021 15:52:31 +0000 (11:52 -0400)]
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.

2 years agoSimplify generated PartialOrd code
Yoshua Wuyts [Tue, 12 Oct 2021 15:44:57 +0000 (17:44 +0200)]
Simplify generated PartialOrd code

2 years agoimpl PartialOrd codegen for tuple enum
Yoshua Wuyts [Tue, 12 Oct 2021 13:07:57 +0000 (15:07 +0200)]
impl PartialOrd codegen for tuple enum

2 years agoimpl PartialOrd codegen for record enum
Yoshua Wuyts [Tue, 12 Oct 2021 12:56:19 +0000 (14:56 +0200)]
impl PartialOrd codegen for record enum

2 years agoimpl PartialOrd codegen for C-style enums
Yoshua Wuyts [Tue, 12 Oct 2021 12:36:50 +0000 (14:36 +0200)]
impl PartialOrd codegen for C-style enums

2 years agoimpl PartialOrd codegen for struct records
Yoshua Wuyts [Tue, 12 Oct 2021 12:24:42 +0000 (14:24 +0200)]
impl PartialOrd codegen for struct records

2 years agoimpl PartialOrd codegen for tuple records
Yoshua Wuyts [Tue, 12 Oct 2021 12:18:08 +0000 (14:18 +0200)]
impl PartialOrd codegen for tuple records

2 years agoinit partialord
Yoshua Wuyts [Mon, 16 Aug 2021 08:07:19 +0000 (10:07 +0200)]
init partialord

2 years agoMerge #10530
bors[bot] [Tue, 12 Oct 2021 13:26:38 +0000 (13:26 +0000)]
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>
2 years agoAdd link to ECS acronym to clarify.
Mirko Rainer [Tue, 12 Oct 2021 13:24:00 +0000 (09:24 -0400)]
Add link to ECS acronym to clarify.

2 years agoMerge #10528
bors[bot] [Tue, 12 Oct 2021 12:42:36 +0000 (12:42 +0000)]
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>
2 years agoMake selections in assists with trailing/leading whitespace more forgiving
Lukas Wirth [Tue, 12 Oct 2021 12:41:59 +0000 (14:41 +0200)]
Make selections in assists with trailing/leading whitespace more forgiving

2 years agoMerge #10526
bors[bot] [Tue, 12 Oct 2021 09:49:02 +0000 (09:49 +0000)]
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>
2 years agoImprove user snippet import performance
Lukas Wirth [Tue, 12 Oct 2021 09:47:22 +0000 (11:47 +0200)]
Improve user snippet import performance

2 years agointernal changes for mdbook
hamidreza kalbasi [Fri, 1 Oct 2021 13:07:11 +0000 (16:37 +0330)]
internal changes for mdbook

2 years agoMerge #10525
bors[bot] [Tue, 12 Oct 2021 07:56:00 +0000 (07:56 +0000)]
Merge #10525

10525: Regenerate lints and features r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoUpdate tidy ignore path
Lukas Wirth [Tue, 12 Oct 2021 07:47:21 +0000 (09:47 +0200)]
Update tidy ignore path

2 years agoRemove stale module
Lukas Wirth [Tue, 12 Oct 2021 07:37:16 +0000 (09:37 +0200)]
Remove stale module

2 years agoRegenerate lints
Lukas Wirth [Tue, 12 Oct 2021 07:27:17 +0000 (09:27 +0200)]
Regenerate lints

2 years agoMove lint source generator
Lukas Wirth [Tue, 12 Oct 2021 06:59:39 +0000 (08:59 +0200)]
Move lint source generator

2 years agoOnly include targets of packages that are workspace members
Brendan Cully [Sun, 10 Oct 2021 02:49:34 +0000 (19:49 -0700)]
Only include targets of packages that are workspace members

CargoWorkspace's package list includes packages that are path
dependencies, even if those packages aren't actually members of the
cargo workspace. As a result, rust-analyzer's runnable finder, which
returns the target from the first workspace that has a matching package,
may select the wrong working directory, causing runnables to fail, e.g.,
```
error: package `root` cannot be tested because it requires dev-dependencies and is not a member of the workspace
```

To fix this, we filter out packages that aren't members of the workspace
when searching for targets.

Fixes #7764

2 years agoMerge #10522
bors[bot] [Mon, 11 Oct 2021 19:58:27 +0000 (19:58 +0000)]
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>
2 years agoMerge #10523
bors[bot] [Mon, 11 Oct 2021 19:51:35 +0000 (19:51 +0000)]
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>
2 years agoSimplify
Lukas Wirth [Mon, 11 Oct 2021 19:49:39 +0000 (21:49 +0200)]
Simplify

2 years agofix: make signature info response conform to spec
Alex Muscar [Mon, 11 Oct 2021 19:42:16 +0000 (20:42 +0100)]
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.

2 years agoMerge #10519
bors[bot] [Mon, 11 Oct 2021 12:51:53 +0000 (12:51 +0000)]
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>
2 years agoAdd toolInfo in MetaData vertex in LSIF dumps
Quentin Gliech [Mon, 11 Oct 2021 12:45:58 +0000 (14:45 +0200)]
Add toolInfo in MetaData vertex in LSIF dumps

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

2 years agoRemove unnecessary unused attribute
Lukas Wirth [Mon, 11 Oct 2021 12:42:18 +0000 (14:42 +0200)]
Remove unnecessary unused attribute

2 years agoShow cargo check failures to the user
Lukas Wirth [Mon, 11 Oct 2021 12:09:20 +0000 (14:09 +0200)]
Show cargo check failures to the user

2 years agoMerge #10514
bors[bot] [Sun, 10 Oct 2021 18:09:13 +0000 (18:09 +0000)]
Merge #10514

10514: internal: clean up code duplication r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: clean up code duplication
Aleksey Kladov [Sun, 10 Oct 2021 18:07:43 +0000 (21:07 +0300)]
internal: clean up code duplication

2 years agoMerge #10513
bors[bot] [Sun, 10 Oct 2021 16:13:59 +0000 (16:13 +0000)]
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>
2 years agominor: align code to code style
Aleksey Kladov [Sun, 10 Oct 2021 16:13:05 +0000 (19:13 +0300)]
minor: align code to code style

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

2 years agoMerge #10512
bors[bot] [Sun, 10 Oct 2021 13:52:45 +0000 (13:52 +0000)]
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>