]>
git.lizzy.rs Git - rust.git/log
veetaha [Sun, 31 May 2020 02:13:08 +0000 (05:13 +0300)]
Change Runnable.bin -> Runnable.kind
As per matklad, we now pass the responsibility for finding the binary to the frontend.
Also, added caching for finding the binary path to reduce
the amount of filesystem interactions.
veetaha [Sat, 23 May 2020 13:31:56 +0000 (16:31 +0300)]
Fix tests, apply code review proposals
veetaha [Sat, 23 May 2020 01:58:22 +0000 (04:58 +0300)]
Fix invoking cargo without consulting CARGO or standard installation paths
bors[bot] [Sat, 30 May 2020 22:00:07 +0000 (22:00 +0000)]
Merge #4662
4662: minor r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 30 May 2020 21:57:16 +0000 (23:57 +0200)]
minor
bors[bot] [Sat, 30 May 2020 08:26:04 +0000 (08:26 +0000)]
Merge #4654
4654: Add semantic highlight to ? operator r=matklad a=ruabmbua
Made it an operator with controlFlow modifier.
To highlight in vscode as red:
```json
"editor.semanticTokenColorCustomizations": {
"enabled": true,
"rules": {
"operator.controlFlow": "#ff0000",
}
}
```
![Bildschirmfoto von 2020-05-29 21-32-06](https://user-images.githubusercontent.com/
2522373 /
83297998 -
f3585a00 -a1f3-11ea-9d14-
4ef04b9b6b9a .png)
https://github.com/rust-analyzer/rust-analyzer/issues/4597
Co-authored-by: Roland Ruckerbauer <roland.rucky@gmail.com>
bors[bot] [Sat, 30 May 2020 08:01:00 +0000 (08:01 +0000)]
Merge #4562
4562: Assist: replace anonymous lifetime with a named one r=matklad a=jbalint
(fixes #4523)
Co-authored-by: Jess Balint <jbalint@gmail.com>
bors[bot] [Sat, 30 May 2020 07:52:07 +0000 (07:52 +0000)]
Merge #4653
4653: Fix match ergonomics in closure parameters r=matklad a=flodiebold
Fixes #4476.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
bors[bot] [Sat, 30 May 2020 04:51:26 +0000 (04:51 +0000)]
Merge #4655
4655: Fix typo in docs/dev/lsp-extensions.md: automagiacally -> automagically r=kjeremy a=theHamsta
This may be a typo...
Co-authored-by: Stephan Seitz <stephan.seitz@fau.de>
Stephan Seitz [Fri, 29 May 2020 21:41:04 +0000 (23:41 +0200)]
Fix typo in docs/dev/lsp-extensions.md: automagiacally -> automagically
bors[bot] [Fri, 29 May 2020 21:07:43 +0000 (21:07 +0000)]
Merge #4651
4651: Use first match branch in case of type mismatch, not last r=kjeremy a=flodiebold
The comment says this was intentional, but I do agree with #4304 that it makes
more sense the other way around (for if/else as well).
Fixes #4304.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
bors[bot] [Fri, 29 May 2020 19:33:52 +0000 (19:33 +0000)]
Merge #4652
4652: Upgrade Chalk r=kjeremy a=flodiebold
Fixes #4072.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Roland Ruckerbauer [Fri, 29 May 2020 19:17:14 +0000 (21:17 +0200)]
Add semantic highlight to QUESTION token
Made it an operator with controlFlow modifier.
Florian Diebold [Fri, 29 May 2020 15:35:57 +0000 (17:35 +0200)]
Fix match ergonomics in closure parameters
Fixes #4476.
bors[bot] [Fri, 29 May 2020 15:04:35 +0000 (15:04 +0000)]
Merge #4648
4648: Support raw_ref_op's raw reference operator r=matklad a=robojumper
Fixes #4642.
This syntax (and its semantics) are implemented in rustc behind the `raw_ref_op` feature.
It is not entirely clear whether this is the syntax that will become stable, but [it seems like](https://github.com/rust-lang/rust/pull/72279) rust-analyzer must still support this unstable syntax to support future stable rust.
Also fixes a random inference failure involving a direct coercion from `&[T, _]` to `*const [T]`.
Co-authored-by: robojumper <robojumper@gmail.com>
Florian Diebold [Fri, 29 May 2020 14:49:52 +0000 (16:49 +0200)]
Upgrade Chalk
Fixes #4072.
Florian Diebold [Fri, 29 May 2020 14:03:06 +0000 (16:03 +0200)]
Use first match branch in case of type mismatch, not last
The comment says this was intentional, but I do agree with #4304 that it makes
more sense the other way around (for if/else as well).
Fixes #4304.
Jess Balint [Thu, 28 May 2020 19:20:26 +0000 (14:20 -0500)]
add support for naming anon lifetimes in function return type
robojumper [Thu, 28 May 2020 19:42:22 +0000 (21:42 +0200)]
Support raw_ref_op's raw reference operator
bors[bot] [Thu, 28 May 2020 13:37:37 +0000 (13:37 +0000)]
Merge #4640
4640: Add `inRustProject` when-clause for commands in vscode r=vsrs a=vsrs
At the moment all rust-analyzer commands always visible in the command palette, even if there is no rust project opened.
This PR adds special [when-clause](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts) context. This context also might be used in key bindings.
Co-authored-by: vsrs <vit@conrlab.com>
Co-authored-by: vsrs <62505555+vsrs@users.noreply.github.com>
vsrs [Thu, 28 May 2020 13:04:42 +0000 (16:04 +0300)]
Add `inRustProject` context documentation.
bors[bot] [Thu, 28 May 2020 09:34:33 +0000 (09:34 +0000)]
Merge #4641
4641: Upgrade Chalk r=matklad a=flodiebold
Chalk newly added TypeName::Never and Array; I implemented the conversion for
Never, but not Array since that expects a const argument.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
bors[bot] [Thu, 28 May 2020 08:20:43 +0000 (08:20 +0000)]
Merge #4646
4646: Link forum topic r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 28 May 2020 08:19:01 +0000 (10:19 +0200)]
Link forum topic
bors[bot] [Wed, 27 May 2020 19:14:11 +0000 (19:14 +0000)]
Merge #4639
4639: Fixed missing newline on each field on "Missing structure fields". r=flodiebold a=flipbit03
Co-authored-by: Cadu <cadu.coelho@gmail.com>
Florian Diebold [Wed, 27 May 2020 19:05:21 +0000 (21:05 +0200)]
Upgrade Chalk
Chalk newly added TypeName::Never and Array; I implemented the conversion for
Never, but not Array since that expects a const argument.
vsrs [Wed, 27 May 2020 16:40:13 +0000 (19:40 +0300)]
Add `inRustProject` when-clause for commands.
Cadu [Wed, 27 May 2020 16:15:19 +0000 (13:15 -0300)]
Fixed missing newline on each field on "Missing structure fields".
bors[bot] [Wed, 27 May 2020 13:22:26 +0000 (13:22 +0000)]
Merge #4592
4592: fix textedit range returned for completion when left token is a keyword r=bnjjj a=bnjjj
close #4545
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Benjamin Coenen [Wed, 27 May 2020 13:15:19 +0000 (15:15 +0200)]
fix textedit range returned for completion when left token is a keyword
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
bors[bot] [Wed, 27 May 2020 12:41:38 +0000 (12:41 +0000)]
Merge #4596
4596: Strip leading underscores of argument names in function/method r=matklad a=kuy
Closes #4510
### Goal
When I select a function/method from completions, I get a snippet that doesn't contain leading underscores of argument names.
### Solution
- Option 1: All signatures don't contain underscores
- Option 2: Keep same signature, but inserted snippet doesn't contain underscores
I choose Option 2 because I think that leading underscores is a part of "signature". Users should get correct signatures. On the other hand, trimming underscores is an assist by IDE.
### Other impls.
rls: Complete argument names with underscores (same as actual ra)
IntelliJ Rust: Doesn't complete argument names
VSCode (TypeScript): Doesn't complete argument names
### Working example
![Screen Shot 2020-05-25 at 0 03 21](https://user-images.githubusercontent.com/151614/
82757771 -
a05e5b80 -9e1d-11ea-9dbc-
1263c960e2ae .png)
Co-authored-by: Yuki Kodama <endflow.net@gmail.com>
bors[bot] [Wed, 27 May 2020 12:34:03 +0000 (12:34 +0000)]
Merge #4625 #4629
4625: Partially fix displaying inlay hints in Github PR diff views r=matklad a=Veetaha
See the comment in https://github.com/rust-analyzer/rust-analyzer/issues/4608#issuecomment-
63424257
It partially fixes the left side of diff view (the one where old code is displayed), but the diff editor with new code changes still has `file` scheme and will proceed displaying inlay hints...
4629: Fix the `should_panic` snippet r=matklad a=eminence
Closes #4628
Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Andrew Chin <achin@eminence32.net>
bors[bot] [Wed, 27 May 2020 12:25:20 +0000 (12:25 +0000)]
Merge #4633
4633: typo r=matklad a=Veetaha
Co-authored-by: Veetaha <veetaha2@gmail.com>
Veetaha [Wed, 27 May 2020 11:04:57 +0000 (14:04 +0300)]
typo
bors[bot] [Wed, 27 May 2020 10:21:31 +0000 (10:21 +0000)]
Merge #4632
4632: Document inlay hints and runnables r=matklad a=matklad
We want to change those, but let's document what we have in meantime
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 27 May 2020 10:20:47 +0000 (12:20 +0200)]
Document inlay hints and runnables
We want to change those, but let's document what we have in meantime
bors[bot] [Wed, 27 May 2020 06:42:04 +0000 (06:42 +0000)]
Merge #4622
4622: Pass trivially copy types as copy r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
Andrew Chin [Tue, 26 May 2020 22:45:14 +0000 (18:45 -0400)]
Fix the `should_panic` snippet
Closes #4628
veetaha [Tue, 26 May 2020 19:51:04 +0000 (22:51 +0300)]
Partially fix displaying inlay hints in Github PR diff views
bors[bot] [Tue, 26 May 2020 19:23:53 +0000 (19:23 +0000)]
Merge #4623
4623: Update deps r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Tue, 26 May 2020 18:35:09 +0000 (14:35 -0400)]
Update lexer
kjeremy [Tue, 26 May 2020 18:32:56 +0000 (14:32 -0400)]
Update crates
kjeremy [Tue, 26 May 2020 18:12:13 +0000 (14:12 -0400)]
Pass trivially copy types as copy
bors[bot] [Tue, 26 May 2020 18:09:41 +0000 (18:09 +0000)]
Merge #4621
4621: Highlight question mark operator r=matklad a=kuy
Fixes #4597
Co-authored-by: Yuki Kodama <endflow.net@gmail.com>
bors[bot] [Tue, 26 May 2020 12:12:52 +0000 (12:12 +0000)]
Merge #4534
4534: Add call postfix completion r=matklad a=vain0x
To make it easier to wrap an expression with Ok/Some/Rc::new etc.
Note I agree with conclusion of the discussion in #1431 that adding many completions is not the way to go. However, this PR still could be justified due to versatility of use.
Co-authored-by: vain0x <vainzerox@gmail.com>
bors[bot] [Tue, 26 May 2020 07:20:56 +0000 (07:20 +0000)]
Merge #4617
4617: Hover tooltip module name is monospace once again r=matklad a=aloucks
The line separator is also moved below the function signature to split regions between the docs. This is very similar to how IntelliJ displays tooltips. Adding an additional separator between the module name and function signature currently has rendering issues.
Fixes #4594
Alternative to #4615
@kjeremy @Veetaha
Note that I have semantic coloring disabled so ignore any differences due to that.
![image](https://user-images.githubusercontent.com/221559/
82857507 -
30180e80 -9edf-11ea-903a-
f25c60055a93 .png)
![image](https://user-images.githubusercontent.com/221559/
82857407 -
e6c7bf00 -9ede-11ea-9ae0-
d348279552e7 .png)
Co-authored-by: Aaron Loucks <aloucks@cofront.net>
Aaron Loucks [Tue, 26 May 2020 03:18:45 +0000 (23:18 -0400)]
Hover tooltip module name is monospace once again
The line separator is moved below the function signature to split
regions between the docs. This is very similar to how IntelliJ
displays tooltips. Adding an additional separator between the module
name and function signature currently has rendering issues.
Fixes #4594
Alternative to #4615
bors[bot] [Mon, 25 May 2020 17:47:11 +0000 (17:47 +0000)]
Merge #4614
4614: Fix some clippy perf warnings r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Yuki Kodama [Mon, 25 May 2020 17:36:34 +0000 (02:36 +0900)]
Add question mark operator
Jeremy Kolb [Mon, 25 May 2020 17:35:52 +0000 (13:35 -0400)]
Fix some clippy perf warnings
Yuki Kodama [Mon, 25 May 2020 16:05:50 +0000 (01:05 +0900)]
Trim at presentation layer
Yuki Kodama [Sun, 24 May 2020 15:14:56 +0000 (00:14 +0900)]
Fix test to consider multiple underscores
Yuki Kodama [Sun, 24 May 2020 14:43:44 +0000 (23:43 +0900)]
Use built-in method
Yuki Kodama [Sun, 24 May 2020 14:01:26 +0000 (23:01 +0900)]
Separate assertions
Yuki Kodama [Sun, 24 May 2020 13:39:09 +0000 (22:39 +0900)]
Reflect test case
Yuki Kodama [Sun, 24 May 2020 09:09:42 +0000 (18:09 +0900)]
Strip leading underscore
Aleksey Kladov [Mon, 25 May 2020 14:31:19 +0000 (16:31 +0200)]
Fix conflict between nightly branch and tag
Aleksey Kladov [Mon, 25 May 2020 14:29:24 +0000 (16:29 +0200)]
Merge pull request #4612 from matklad/fix-tag
Try fixing release tags
Aleksey Kladov [Mon, 25 May 2020 14:26:01 +0000 (16:26 +0200)]
Try fixing release tags
closes #4319
bors[bot] [Mon, 25 May 2020 14:08:21 +0000 (14:08 +0000)]
Merge #4602 #4603
4602: Add boolean literal semantic token type to package.json r=matklad a=lnicola
Closes #4583.
CC @GrayJack
4603: Add self keyword semantic token type r=matklad a=lnicola
Not sure if this is warranted a new token type or just a modifier.
---
CC #4583, @GrayJack
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Mon, 25 May 2020 14:00:24 +0000 (14:00 +0000)]
Merge #4611
4611: Document `parentModule` experimental LSP request r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 25 May 2020 13:55:25 +0000 (15:55 +0200)]
Document `parentModule` experimental LSP request
bors[bot] [Mon, 25 May 2020 12:58:50 +0000 (12:58 +0000)]
Merge #4610
4610: Cleanup lsp extensions on the client side r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 25 May 2020 12:56:26 +0000 (14:56 +0200)]
Cleanup lsp extensions on the client side
bors[bot] [Mon, 25 May 2020 12:29:47 +0000 (12:29 +0000)]
Merge #4607
4607: Less rust-analyzer specific onEnter r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 25 May 2020 12:12:53 +0000 (14:12 +0200)]
Less rust-analyzer specific onEnter
bors[bot] [Mon, 25 May 2020 10:17:40 +0000 (10:17 +0000)]
Merge #4605
4605: Reorganize TypeScript r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 25 May 2020 10:02:30 +0000 (12:02 +0200)]
Flatten commands.ts
Aleksey Kladov [Mon, 25 May 2020 09:10:31 +0000 (11:10 +0200)]
Flatten simple commands
Laurențiu Nicola [Mon, 25 May 2020 08:51:56 +0000 (11:51 +0300)]
Add self keyword semantic token type
Aleksey Kladov [Mon, 25 May 2020 08:59:54 +0000 (10:59 +0200)]
Remove dead code
Laurențiu Nicola [Mon, 25 May 2020 08:39:56 +0000 (11:39 +0300)]
Add boolean literals to package.json
bors[bot] [Mon, 25 May 2020 07:14:43 +0000 (07:14 +0000)]
Merge #4601
4601: Introduce `toggle inlay hints` vscode command r=matklad a=Veetaha
Users now can assign a shortcut for this command
via the general vscode
keybindings ui or `keybindings.json` file
<details>
<summary>Demo</summary>
![demo](https://user-images.githubusercontent.com/
36276403 /
82768941 -
b4fd1c80 -9e3a-11ea-9d5b-
a40fa1e4dbc6 .gif)
</details>
<details>
<summary>Howto assign a shortcut</summary>
![demo2](https://user-images.githubusercontent.com/
36276403 /
82769350 -
c8a98280 -9e3c-11ea-8a95-
1266a539826d .gif)
</details>
Closes: #4599
Co-authored-by: veetaha <veetaha2@gmail.com>
veetaha [Mon, 25 May 2020 00:47:33 +0000 (03:47 +0300)]
Introduce `toggle inlay hints` vscode command
Users now can assign a shortcut for this command
via the general vscode
keybindings ui or `keybinding.json file`
Closes: #4599
bors[bot] [Sun, 24 May 2020 15:05:20 +0000 (15:05 +0000)]
Merge #4593
4593: Document some rust-analyzer specific protocol extensions r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 24 May 2020 15:04:17 +0000 (17:04 +0200)]
Fix formatting
Aleksey Kladov [Sun, 24 May 2020 15:01:40 +0000 (17:01 +0200)]
Document some rust-analyzer specific protocol extensions
Aleksey Kladov [Sun, 24 May 2020 14:18:46 +0000 (16:18 +0200)]
Document matchingBrace LSP request
Benjamin Coenen [Sun, 24 May 2020 14:47:35 +0000 (16:47 +0200)]
fix textedit range returned for completion when left token is a keyword #4545
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
bors[bot] [Sun, 24 May 2020 14:20:22 +0000 (14:20 +0000)]
Merge #4556
4556: More highlighting improvements r=matthewjasper a=matthewjasper
* Separate `true` and `false` from keywords (this matches the Textmate grammar).
* Handle more cases in `highlight_name_by_syntax`.
Co-authored-by: Matthew Jasper <mjjasper1@gmail.com>
Matthew Jasper [Thu, 21 May 2020 16:44:45 +0000 (17:44 +0100)]
Handle more cases in `highlight_name_by_syntax`
Matthew Jasper [Thu, 21 May 2020 16:40:52 +0000 (17:40 +0100)]
Highlight `true` and `false` as literals
Aleksey Kladov [Sun, 24 May 2020 14:07:46 +0000 (16:07 +0200)]
Fix bors config?
Aleksey Kladov [Sun, 24 May 2020 14:05:41 +0000 (16:05 +0200)]
Merge pull request #4574 from lnicola/bump-deps
Bump some dependencies
Aleksey Kladov [Sun, 24 May 2020 13:49:32 +0000 (15:49 +0200)]
Reorgonise extensions docs
Aleksey Kladov [Sun, 24 May 2020 13:47:05 +0000 (15:47 +0200)]
Fix tests
Aleksey Kladov [Sun, 24 May 2020 13:42:11 +0000 (15:42 +0200)]
Fix Cargo.lock
Aleksey Kladov [Sun, 24 May 2020 13:34:35 +0000 (15:34 +0200)]
Merge pull request #4548 from bnjjj/fix_4464
add support of feature flag for runnables
Aleksey Kladov [Sun, 24 May 2020 13:32:52 +0000 (15:32 +0200)]
Merge pull request #4495 from vsrs/fixture_meta
Test fixtures parsing improvements
Aleksey Kladov [Sun, 24 May 2020 13:32:31 +0000 (15:32 +0200)]
Merge pull request #4474 from georgewfraser/color_attrs
Color attribute functions
Laurențiu Nicola [Sun, 24 May 2020 10:41:46 +0000 (13:41 +0300)]
Bump more crates
Laurențiu Nicola [Fri, 22 May 2020 18:34:53 +0000 (21:34 +0300)]
Bump more npm deps
Laurențiu Nicola [Fri, 22 May 2020 18:20:59 +0000 (21:20 +0300)]
Bump some npm deps
Laurențiu Nicola [Fri, 22 May 2020 18:16:06 +0000 (21:16 +0300)]
Bump rustc_lexer
Aleksey Kladov [Sun, 24 May 2020 13:27:58 +0000 (15:27 +0200)]
Merge pull request #4590 from Julian-Wollersberger/update_unescape
Update to rustc_lexer version 660
Benjamin Coenen [Sun, 24 May 2020 11:34:34 +0000 (13:34 +0200)]
add support of feature flag for runnables #4464
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Julian Wollersberger [Sun, 24 May 2020 11:17:16 +0000 (13:17 +0200)]
Some FIXMEs were outdated:
* Done at line 243: "Add validation of `crate` keyword not appearing in the middle of the symbol path"
* Already happened: "Remove validation of unterminated literals (it is already implemented in `tokenize()`)"
* Happens in `unescape()`: "Add validation of character literal containing only a single char"
* Missing: "raw string literals and raw byte string literals"
Julian Wollersberger [Sun, 24 May 2020 11:12:16 +0000 (13:12 +0200)]
Update to rustc_lexer version 660.
Change `unescape_*()` to `unescape_literal()`.
Benjamin Coenen [Sat, 23 May 2020 18:59:18 +0000 (20:59 +0200)]
add support of feature flag for runnables #4464
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Aleksey Kladov [Sat, 23 May 2020 14:39:04 +0000 (16:39 +0200)]
Merge pull request #4538 from vsrs/vscode_tests
vscode client side tests