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.
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.
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
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.
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!
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.
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.
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.
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.
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.
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.