Commit graph

14030 commits

Author SHA1 Message Date
bors[bot]
85a2875161
Merge #7015
7015: Disable the unaligned feature of the object crate r=lnicola a=lnicola

We `mmap` the files so they should be reasonably aligned.

Let's see what https://github.com/rust-analyzer/rust-analyzer/pull/6817#issuecomment-744866239 is about.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-23 08:49:36 +00:00
Laurențiu Nicola
56deb240b2 Disable unaligned feature for the object crate 2020-12-23 10:40:12 +02:00
bors[bot]
8aa2eb76dc
Merge #7014
7014: Set RA_TARGET at job level r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-23 08:38:29 +00:00
Laurențiu Nicola
2707dc384d Set RA_TARGET at job level 2020-12-23 10:13:19 +02:00
bors[bot]
5e005cd91e
Merge #7013
7013: Don't think that /submod.rs is /mod.rs r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-12-23 08:04:35 +00:00
Aleksey Kladov
2c84c2d07a Don't think that /submod.rs is /mod.rs 2020-12-23 11:02:42 +03:00
bors[bot]
58b6763f20
Merge #7012
7012: Document, how to view config in effect r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-12-23 07:47:40 +00:00
Aleksey Kladov
7c07bb6381 Document, how to view config in effect 2020-12-23 10:47:05 +03:00
bors[bot]
f7f85cdd8d
Merge #7011
7011: Don't release uncompressed binaries under the new naming scheme r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-23 07:03:43 +00:00
Laurențiu Nicola
25a987703c Don't release uncompressed binaries under the new naming scheme 2020-12-23 08:46:38 +02:00
bors[bot]
493e29d713
Merge #7000
7000: Store invocation site for eager macros r=edwin0cheng a=jonas-schievink

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

r? @edwin0cheng 

I'm not sure if this is totally correct, it looks like we create **two** `EagerCallLoc`s per macro invocation, one for the arguments (?), and one for the actual macro call. I gave both the same `AstId`, hopefully that's correct.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-23 06:22:28 +00:00
bors[bot]
4a2f60cb7b
Merge #6964
6964: Add full pattern completions for Struct and Variant patterns r=matklad a=Veykril


Just gonna call it full pattern completion as pattern completion is already implemented in a sense by showing idents in pattern position. What this does is basically complete struct and variant patterns where applicable(function params, let statements and refutable pattern locations).

This does not replace just completing the corresponding idents of the structs and variants, instead two completions are shown for these, a completion for the ident itself and a completion for the pattern(if the pattern make sense to be used that is). I figured in some cases one would rather type out the pattern manually if it has a lot of fields but you only care about one since this completion would cause one more work in the end since you would have to delete all the extra matched fields again.

These completions are tagged as `CompletionKind::Snippet`, not sure if that is the right one here.
<details>
  <summary>some gifs</summary>

![dx2lxgzhj3](https://user-images.githubusercontent.com/3757771/102719967-6987ef80-42f1-11eb-8ae0-8aff53777860.gif)
![EP2E7sJLkB](https://user-images.githubusercontent.com/3757771/102785777-c7264580-439e-11eb-8a64-f142e19fb65b.gif)
![JMNHHWknr9](https://user-images.githubusercontent.com/3757771/102785796-d1e0da80-439e-11eb-934b-218ada31b51c.gif)
</details>

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-22 18:03:51 +00:00
Lukas Wirth
83121efcd5 Reduce some more code duplication 2020-12-22 19:00:38 +01:00
bors[bot]
94f661c62a
Merge #7001
7001: Add support for downloading aarch64-apple-darwin binaries r=matklad a=lnicola

There's also a slight behavior change here: we no longer download our 64-binaries on 32-bit Darwin and Linux. We still do that on Windows, as I don't know how to detect 32-bit Node on 64 Windows.

But some people install the 32-bit Code by mistake, I doubt 32-bit Windows is that popular in the Rust crowd.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-22 16:38:12 +00:00
bors[bot]
b28322eed6
Merge #7005
7005: Improve extract_module_to_file assist r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-12-22 16:15:20 +00:00
Aleksey Kladov
41bc32368e Improve extract_module_to_file assist
* simplify code
* correctly handle crate roots and mod.rs files (nested inline modules
  are still mishandled)
* make sure that new text contains a trailing newline
2020-12-22 19:13:53 +03:00
bors[bot]
5506933a93
Merge #7002
7002: Extension conflict check detects more combinations r=extremegf a=extremegf

This will also detect conflicts with kalitaalexey.vscode-rust and work correctly after RA is integrated with rust-lang.rust extension.

Co-authored-by: Przemyslaw Horban <p.horban@invinets.com>
Co-authored-by: P. Horban <extremegf@gmail.com>
2020-12-22 15:23:36 +00:00
P. Horban
92b13d2fab
Fix grammar nit
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-12-22 16:22:33 +01:00
bors[bot]
013739c73d
Merge #6993
6993: Clean up descriptions for settings r=matklad a=rherrmann

Use two consecutive newlines (`\n\n`) to actually continue text on a
new line.

Use proper markup to reference related settings.

Consistently format references to files, command line arguments, etc.
as `code`. Format mentions of UI elements in _italic_.

Fix typos, add missing full-stops, add missing default values.

Co-authored-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
2020-12-22 15:07:36 +00:00
Przemyslaw Horban
a8b60afc2a Extension conflict check detests more combinations 2020-12-22 15:53:00 +01:00
Laurențiu Nicola
5ff576f503 Add support for downloading aarch64-apple-darwin binaries, change naming convention 2020-12-22 16:48:49 +02:00
Jonas Schievink
26f604b907 Store invocation site for eager macros 2020-12-22 15:02:03 +01:00
Rüdiger Herrmann
9f070531a6 Clean up descriptions for settings
Use two consecutive newlines (`\n\n`) to actually continue text on a
new line.

Use proper markup to reference related settings.

Consistently format references to files, editor commands, command line
arguments, files, etc. as `code`.

Fix typos, add missing full-stops, add missing default values.
2020-12-22 14:51:17 +01:00
bors[bot]
e1acb0ca5c
Merge #6999
6999: Build aarch64-apple-darwin binaries on CI (take 2) r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-22 13:19:27 +00:00
Laurențiu Nicola
c06efa380d Build aarch64-apple-darwin binaries on CI 2020-12-22 15:13:34 +02:00
bors[bot]
1f22eca3d4
Merge #6989
6989: Build aarch64-apple-darwin binaries on CI r=matklad a=lnicola

This splits the `dist` matrix job into four and tries to make `xtask dist` more principled about target and artifact naming.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-22 13:12:22 +00:00
Laurențiu Nicola
e881815115 Build aarch64-apple-darwin binaries on CI 2020-12-22 13:18:00 +02:00
bors[bot]
b98ee075ee
Merge #6746
6746: Feature/add assist extract module to file r=matklad a=sasurau4

Fix #6522 

## Screenshot

<img src="https://user-images.githubusercontent.com/13580199/102748269-33a44300-43a5-11eb-9e37-f5fcb8e62f73.gif" width=600 />


## TODO

- [x] Remove all TODO comment
- [x] Pass the doc test



Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
2020-12-22 10:04:24 +00:00
bors[bot]
61711d9757
Merge #6984
6984: Remove TextMate grammar r=dustypomerleau a=lnicola

Closes #6267

This is now included upstream in VS Code.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-22 04:02:28 +00:00
bors[bot]
ba71685343
Merge #6991
6991: Don't download x64 binaries on non-Mac arm64 r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-21 19:40:38 +00:00
Laurențiu Nicola
211551646f Don't download x64 binaries on non-Mac arm64 2020-12-21 21:40:01 +02:00
bors[bot]
4c8a641f72
Merge #6990
6990: Allow code extension to download binary in apple arm r=lnicola a=phungleson

Apple chip has a new `arch`. It subsequently downloads Intel version of `rust-analyzer` but it works regardless.

Co-authored-by: Son <leson.phung@gmail.com>
2020-12-21 19:28:37 +00:00
Son
6089c6b1ea Allow code extension to download binary in apple arm 2020-12-22 06:23:50 +11:00
bors[bot]
e86344745e
Merge #6988
6988: Remove outdated FIXME r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-21 18:37:37 +00:00
Laurențiu Nicola
1da99a79d9 Remove outdated FIXME 2020-12-21 20:36:58 +02:00
bors[bot]
e4f922a74d
Merge #6985
6985: Use /etc/os-release to check for NixOS r=matklad a=lnicola

Closes #5641

The motivation in #5641 isn't too strong, but /etc/os-release exists on pretty much every Linux distro, while /etc/nixos sounds like an implementation detail.


Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-21 18:21:49 +00:00
bors[bot]
87762874ef
Merge #6987
6987: Delete related whitespace when removing unused param r=matklad a=rherrmann

Include adjacent whitespace in the text edits to remove the
parameter declaration and its occurences in calling code.

https://github.com/rust-analyzer/rust-analyzer/issues/6663

Co-authored-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
2020-12-21 18:15:17 +00:00
Rüdiger Herrmann
658ba9e29c Delete related whitespace when removing unused param
Include adjacent whitespace in the text edits to remove the
parameter declaration and its occurences in calling code.

https://github.com/rust-analyzer/rust-analyzer/issues/6663
2020-12-21 18:42:42 +01:00
Laurențiu Nicola
ee73466830 Use /etc/os-release to check for NixOS
The motivation in #5641 isn't too strong, but /etc/os-release exists on
pretty much every Linux distro, while /etc/nixos sounds like an
implementation detail.
2020-12-21 19:21:43 +02:00
Laurențiu Nicola
133a32d446 Remove TextMate grammar
It's now included upstream in VS Code
2020-12-21 18:58:46 +02:00
bors[bot]
c8a73fe655
Merge #6982
6982: Remove parentheses when inverting `!(cond)` r=matklad a=Jesse-Bakker

Followup to #6894

When inverting a composite condition twice, the parentheses were left. This also removes those unnecessary parentheses when applying the invert-if assist.

Co-authored-by: Jesse Bakker <github@jessebakker.com>
2020-12-21 16:57:49 +00:00
Jesse Bakker
2e7abf8384 Remove parentheses when inverting !(cond) 2020-12-21 17:37:38 +01:00
bors[bot]
71c8073aa1
Merge #6981
6981: Acquire original text range when searching for references r=Veykril a=Veykril

Fixes #6976

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-21 16:29:59 +00:00
Lukas Wirth
a4f34e2c8c Acquire original text range when searching for references 2020-12-21 17:28:47 +01:00
bors[bot]
04525253a0
Merge #6978
6978: Filter out empty rustc spans r=lnicola a=jonas-schievink

Hopefully, this fixes https://github.com/rust-analyzer/rust-analyzer/issues/6892 (I couldn't test it since r-a currently requires a too recent version of VS Code)

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-21 15:16:16 +00:00
Jonas Schievink
ee8d7a7123 Filter out empty rustc spans 2020-12-21 15:38:27 +01:00
Lukas Wirth
2cd2947bf8 Insert snippet positions after fields names in record patterns 2020-12-21 15:10:27 +01:00
bors[bot]
ab343e47c6
Merge #6977
6977: Revert "Stop setting CompletionItem::deprecated" r=lnicola a=lnicola

We should keep setting it, according to https://github.com/rust-analyzer/rust-analyzer/pull/6974#issuecomment-748983789.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-21 14:00:34 +00:00
Laurențiu Nicola
328e0e2de7 Revert "Stop setting CompletionItem::deprecated"
This reverts commit 299ce60995.
2020-12-21 15:58:26 +02:00
bors[bot]
7843ae6ddb
Merge #6974
6974: Stop setting CompletionItem::deprecated r=matklad a=lnicola

Closes #2042

We're now using the `CompletionItem::tags` field to mark `CompletionItem`s as deprecated, and `CompletionItem::deprecated` is gone from LSP.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-21 12:10:01 +00:00