]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #7011
bors[bot] [Wed, 23 Dec 2020 07:03:43 +0000 (07:03 +0000)]
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>
3 years agoDon't release uncompressed binaries under the new naming scheme
Laurențiu Nicola [Wed, 23 Dec 2020 06:34:10 +0000 (08:34 +0200)]
Don't release uncompressed binaries under the new naming scheme

3 years agoMerge #7000
bors[bot] [Wed, 23 Dec 2020 06:22:28 +0000 (06:22 +0000)]
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>
3 years agoMerge #6964
bors[bot] [Tue, 22 Dec 2020 18:03:51 +0000 (18:03 +0000)]
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>
3 years agoReduce some more code duplication
Lukas Wirth [Tue, 22 Dec 2020 18:00:38 +0000 (19:00 +0100)]
Reduce some more code duplication

3 years agoMerge #7001
bors[bot] [Tue, 22 Dec 2020 16:38:12 +0000 (16:38 +0000)]
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>
3 years agoMerge #7005
bors[bot] [Tue, 22 Dec 2020 16:15:20 +0000 (16:15 +0000)]
Merge #7005

7005: Improve extract_module_to_file assist r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoImprove extract_module_to_file assist
Aleksey Kladov [Tue, 22 Dec 2020 16:13:53 +0000 (19:13 +0300)]
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

3 years agoMerge #7002
bors[bot] [Tue, 22 Dec 2020 15:23:36 +0000 (15:23 +0000)]
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>
3 years agoFix grammar nit
P. Horban [Tue, 22 Dec 2020 15:22:33 +0000 (16:22 +0100)]
Fix grammar nit

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
3 years agoMerge #6993
bors[bot] [Tue, 22 Dec 2020 15:07:36 +0000 (15:07 +0000)]
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>
3 years agoExtension conflict check detests more combinations
Przemyslaw Horban [Tue, 22 Dec 2020 14:52:41 +0000 (15:52 +0100)]
Extension conflict check detests more combinations

3 years agoAdd support for downloading aarch64-apple-darwin binaries, change naming convention
Laurențiu Nicola [Tue, 22 Dec 2020 14:46:01 +0000 (16:46 +0200)]
Add support for downloading aarch64-apple-darwin binaries, change naming convention

3 years agoStore invocation site for eager macros
Jonas Schievink [Tue, 22 Dec 2020 13:42:28 +0000 (14:42 +0100)]
Store invocation site for eager macros

3 years agoClean up descriptions for settings
Rüdiger Herrmann [Tue, 22 Dec 2020 00:15:50 +0000 (01:15 +0100)]
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.

3 years agoMerge #6999
bors[bot] [Tue, 22 Dec 2020 13:19:27 +0000 (13:19 +0000)]
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>
3 years agoBuild aarch64-apple-darwin binaries on CI
Laurențiu Nicola [Mon, 21 Dec 2020 19:06:46 +0000 (21:06 +0200)]
Build aarch64-apple-darwin binaries on CI

3 years agoMerge #6989
bors[bot] [Tue, 22 Dec 2020 13:12:22 +0000 (13:12 +0000)]
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>
3 years agoBuild aarch64-apple-darwin binaries on CI
Laurențiu Nicola [Mon, 21 Dec 2020 19:06:46 +0000 (21:06 +0200)]
Build aarch64-apple-darwin binaries on CI

3 years agoMerge #6746
bors[bot] [Tue, 22 Dec 2020 10:04:24 +0000 (10:04 +0000)]
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>
3 years agoMerge #6984
bors[bot] [Tue, 22 Dec 2020 04:02:28 +0000 (04:02 +0000)]
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>
3 years agoMerge #6991
bors[bot] [Mon, 21 Dec 2020 19:40:38 +0000 (19:40 +0000)]
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>
3 years agoDon't download x64 binaries on non-Mac arm64
Laurențiu Nicola [Mon, 21 Dec 2020 19:40:01 +0000 (21:40 +0200)]
Don't download x64 binaries on non-Mac arm64

3 years agoMerge #6990
bors[bot] [Mon, 21 Dec 2020 19:28:37 +0000 (19:28 +0000)]
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>
3 years agoAllow code extension to download binary in apple arm
Son [Mon, 21 Dec 2020 19:23:50 +0000 (06:23 +1100)]
Allow code extension to download binary in apple arm

3 years agoMerge #6988
bors[bot] [Mon, 21 Dec 2020 18:37:37 +0000 (18:37 +0000)]
Merge #6988

6988: Remove outdated FIXME r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoRemove outdated FIXME
Laurențiu Nicola [Mon, 21 Dec 2020 18:36:58 +0000 (20:36 +0200)]
Remove outdated FIXME

3 years agoMerge #6985
bors[bot] [Mon, 21 Dec 2020 18:21:49 +0000 (18:21 +0000)]
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>
3 years agoMerge #6987
bors[bot] [Mon, 21 Dec 2020 18:15:17 +0000 (18:15 +0000)]
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>
3 years agoDelete related whitespace when removing unused param
Rüdiger Herrmann [Sat, 5 Dec 2020 13:28:15 +0000 (14:28 +0100)]
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

3 years agoUse /etc/os-release to check for NixOS
Laurențiu Nicola [Mon, 21 Dec 2020 17:18:50 +0000 (19:18 +0200)]
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.

3 years agoRemove TextMate grammar
Laurențiu Nicola [Mon, 21 Dec 2020 16:58:33 +0000 (18:58 +0200)]
Remove TextMate grammar

It's now included upstream in VS Code

3 years agoMerge #6982
bors[bot] [Mon, 21 Dec 2020 16:57:49 +0000 (16:57 +0000)]
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>
3 years agoRemove parentheses when inverting `!(cond)`
Jesse Bakker [Mon, 21 Dec 2020 16:37:38 +0000 (17:37 +0100)]
Remove parentheses when inverting `!(cond)`

3 years agoMerge #6981
bors[bot] [Mon, 21 Dec 2020 16:29:59 +0000 (16:29 +0000)]
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>
3 years agoAcquire original text range when searching for references
Lukas Wirth [Mon, 21 Dec 2020 16:18:26 +0000 (17:18 +0100)]
Acquire original text range when searching for references

3 years agoMerge #6978
bors[bot] [Mon, 21 Dec 2020 15:16:16 +0000 (15:16 +0000)]
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>
3 years agoFilter out empty rustc spans
Jonas Schievink [Mon, 21 Dec 2020 14:38:27 +0000 (15:38 +0100)]
Filter out empty rustc spans

3 years agoInsert snippet positions after fields names in record patterns
Lukas Wirth [Mon, 21 Dec 2020 14:10:27 +0000 (15:10 +0100)]
Insert snippet positions after fields names in record patterns

3 years agoMerge #6977
bors[bot] [Mon, 21 Dec 2020 14:00:34 +0000 (14:00 +0000)]
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>
3 years agoRevert "Stop setting CompletionItem::deprecated"
Laurențiu Nicola [Mon, 21 Dec 2020 13:58:26 +0000 (15:58 +0200)]
Revert "Stop setting CompletionItem::deprecated"

This reverts commit 299ce609952dfaa6bef86e967c5632e8e42b8fca.

3 years agoMerge #6974
bors[bot] [Mon, 21 Dec 2020 12:10:01 +0000 (12:10 +0000)]
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>
3 years agoStop setting CompletionItem::deprecated
Laurențiu Nicola [Mon, 21 Dec 2020 11:18:25 +0000 (13:18 +0200)]
Stop setting CompletionItem::deprecated

3 years agoMerge #6965
bors[bot] [Mon, 21 Dec 2020 08:54:31 +0000 (08:54 +0000)]
Merge #6965

6965: Properly attach attributes to Param instead of parent ParamList r=matklad a=Veykril

Fixes #2783, fixes #2781

The problem with `let _a = [0,#[cfg(feature = "L")]0];` has already been fixed some time ago it seems:
<details>
  <summary>Syntax Tree for the const item</summary>

```
  LET_STMT@200..236
    LET_KW@200..203 "let"
    WHITESPACE@203..204 " "
    IDENT_PAT@204..206
      NAME@204..206
        IDENT@204..206 "_a"
    WHITESPACE@206..207 " "
    EQ@207..208 "="
    WHITESPACE@208..209 " "
    ARRAY_EXPR@209..235
      L_BRACK@209..210 "["
      LITERAL@210..211
        INT_NUMBER@210..211 "0"
      COMMA@211..212 ","
      LITERAL@212..234
        ATTR@212..233
          POUND@212..213 "#"
          L_BRACK@213..214 "["
          PATH@214..217
            PATH_SEGMENT@214..217
              NAME_REF@214..217
                IDENT@214..217 "cfg"
          TOKEN_TREE@217..232
            L_PAREN@217..218 "("
            IDENT@218..225 "feature"
            WHITESPACE@225..226 " "
            EQ@226..227 "="
            WHITESPACE@227..228 " "
            STRING@228..231 "\"L\""
            R_PAREN@231..232 ")"
          R_BRACK@232..233 "]"
        INT_NUMBER@233..234 "0"
      R_BRACK@234..235 "]"
    SEMICOLON@235..236 ";"
```
</details>

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6967
bors[bot] [Mon, 21 Dec 2020 08:46:42 +0000 (08:46 +0000)]
Merge #6967

6967: Correctly parse legacy trait objects with leading ForType r=matklad a=Veykril

Fixes #1422

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUse workspace applyEdit instead of snippetWorkspaceEdit
Daiki Ihara [Mon, 21 Dec 2020 06:51:45 +0000 (15:51 +0900)]
Use workspace applyEdit instead of snippetWorkspaceEdit

3 years agoFix assist test logic
Daiki Ihara [Mon, 21 Dec 2020 06:50:59 +0000 (15:50 +0900)]
Fix assist test logic

3 years agoUpdate test diagnostics in ide
Daiki Ihara [Thu, 17 Dec 2020 13:10:41 +0000 (22:10 +0900)]
Update test diagnostics in ide

3 years agoAdd initial_contents field for CreateFile
Daiki Ihara [Thu, 17 Dec 2020 13:09:55 +0000 (22:09 +0900)]
Add initial_contents field for CreateFile

3 years agoAdd extract_module_to_file assist
Daiki Ihara [Mon, 7 Dec 2020 16:17:54 +0000 (01:17 +0900)]
Add extract_module_to_file assist

3 years agoAdd handling file_system_edit in test assists
Daiki Ihara [Mon, 7 Dec 2020 16:17:13 +0000 (01:17 +0900)]
Add handling file_system_edit in test assists

3 years agoMerge #6968
bors[bot] [Sun, 20 Dec 2020 22:31:18 +0000 (22:31 +0000)]
Merge #6968

6968: Update syn and quote r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
3 years agoUpdate syn and quote
Jeremy Kolb [Sun, 20 Dec 2020 22:26:44 +0000 (17:26 -0500)]
Update syn and quote

3 years agoProperly parse legacy trait objects with leading ForType
Lukas Wirth [Sun, 20 Dec 2020 20:53:55 +0000 (21:53 +0100)]
Properly parse legacy trait objects with leading ForType

3 years agoParse attributes in tuple expressions
Lukas Wirth [Sun, 20 Dec 2020 20:01:36 +0000 (21:01 +0100)]
Parse attributes in tuple expressions

3 years agoProperly attach attributes to Param instead of parent ParamList
Lukas Wirth [Sun, 20 Dec 2020 19:30:18 +0000 (20:30 +0100)]
Properly attach attributes to Param instead of parent ParamList

3 years agoCreate non-exhaustive patterns for non_exhaustive attributed items
Lukas Wirth [Sun, 20 Dec 2020 19:13:06 +0000 (20:13 +0100)]
Create non-exhaustive patterns for non_exhaustive attributed items

3 years agoReduce code duplication in pattern completion
Lukas Wirth [Sun, 20 Dec 2020 18:20:55 +0000 (19:20 +0100)]
Reduce code duplication in pattern completion

3 years agoEmit snippets for struct pattern completion if enabled
Lukas Wirth [Sun, 20 Dec 2020 18:16:28 +0000 (19:16 +0100)]
Emit snippets for struct pattern completion if enabled

3 years agoMerge #6963
bors[bot] [Sun, 20 Dec 2020 17:32:19 +0000 (17:32 +0000)]
Merge #6963

6963: Split lines between sentences r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoSplit lines between sentences
Laurențiu Nicola [Sun, 20 Dec 2020 17:31:08 +0000 (19:31 +0200)]
Split lines between sentences

3 years agoAdd completions for patterns
Lukas Wirth [Sun, 20 Dec 2020 17:19:23 +0000 (18:19 +0100)]
Add completions for patterns

3 years agoMerge #6961
bors[bot] [Sun, 20 Dec 2020 15:11:54 +0000 (15:11 +0000)]
Merge #6961

6961: Document the version requirements for building from source r=lnicola a=lnicola

Fixes #6667

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoDocument the version requirements for building from source
Laurențiu Nicola [Sun, 20 Dec 2020 15:10:54 +0000 (17:10 +0200)]
Document the version requirements for building from source

3 years agoMerge #6959
bors[bot] [Sun, 20 Dec 2020 14:08:53 +0000 (14:08 +0000)]
Merge #6959

6959: Use pattern_single instead of pattern in mbe pat r=jonas-schievink a=edwin0cheng

Fix #6882

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoMerge #6921
bors[bot] [Sun, 20 Dec 2020 11:47:01 +0000 (11:47 +0000)]
Merge #6921

6921: Higher-ranked trait bounds for where clauses r=flodiebold a=Veykril

There is a slight problem with this which is also noted in a FIXME now but `LifetimeParameters` of these ForLifetime where clauses allocate the lifetimes in the corresponding arena as if they were lifetimes of the item itself and not just the clause they belong to. I wasn't entirely sure what I could do about this but given nothing really uses lifetimes like that currently I figured it might be fine? Open to suggestions for that problem.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUse pattern_single instead of pattern in mbe pat
Edwin Cheng [Sun, 20 Dec 2020 09:13:40 +0000 (17:13 +0800)]
Use pattern_single instead of pattern in mbe pat

3 years agoMerge #6958
bors[bot] [Sun, 20 Dec 2020 07:06:55 +0000 (07:06 +0000)]
Merge #6958

6958: Align code_model name with ungrammar r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAlign code_model name with ungrammar
Aleksey Kladov [Sun, 20 Dec 2020 07:05:24 +0000 (10:05 +0300)]
Align code_model name with ungrammar

3 years agoMerge #6929
bors[bot] [Sun, 20 Dec 2020 06:33:19 +0000 (06:33 +0000)]
Merge #6929

6929: Handle $_ in mbe r=edwin0cheng a=lnicola

Fixes #6926

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agombe: treat _ as ident
Laurențiu Nicola [Fri, 18 Dec 2020 15:47:48 +0000 (17:47 +0200)]
mbe: treat _ as ident

3 years agoMerge #6954
bors[bot] [Sat, 19 Dec 2020 19:05:43 +0000 (19:05 +0000)]
Merge #6954

6954: cargo update r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
3 years agocargo update
Jeremy Kolb [Sat, 19 Dec 2020 19:04:31 +0000 (14:04 -0500)]
cargo update

3 years agoMerge #6953
bors[bot] [Sat, 19 Dec 2020 18:56:50 +0000 (18:56 +0000)]
Merge #6953

6953: Add test_rename_bind_pat r=bjorn3 a=bjorn3

Fixes #2976

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
3 years agoAdd test_rename_bind_pat
bjorn3 [Sat, 19 Dec 2020 18:37:19 +0000 (19:37 +0100)]
Add test_rename_bind_pat

3 years agoMerge #6946
bors[bot] [Sat, 19 Dec 2020 18:43:20 +0000 (18:43 +0000)]
Merge #6946

6946: Better fuzzy heuristics r=matklad a=SomeoneToIgnore

Continuation of the https://github.com/rust-analyzer/rust-analyzer/pull/6922, mainly created for a test.

Turns out our current completions tests were sorting the completions by label, I had to remove that to test the order properly and update this order in a bunch of tests (ergo the changes)

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoFewer allocations
Kirill Bulatov [Sat, 19 Dec 2020 18:42:16 +0000 (20:42 +0200)]
Fewer allocations

3 years agoMerge #6951
bors[bot] [Sat, 19 Dec 2020 15:48:09 +0000 (15:48 +0000)]
Merge #6951

6951: Make sure that HighlightModifier::ALL is synchronized with enum r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMake sure that HighlightModifier::ALL is synchronized with enum
Aleksey Kladov [Sat, 19 Dec 2020 15:46:42 +0000 (18:46 +0300)]
Make sure that HighlightModifier::ALL is synchronized with enum

3 years agoMerge #6948
bors[bot] [Sat, 19 Dec 2020 14:25:33 +0000 (14:25 +0000)]
Merge #6948

6948: Add API for mapping `Attr` back to its syntax node r=jonas-schievink a=jonas-schievink

This will be useful for emitting diagnostics pertaining to a specific attribute

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #6949
bors[bot] [Sat, 19 Dec 2020 14:19:13 +0000 (14:19 +0000)]
Merge #6949

6949: Clarify the meaning of no-op highlight tag r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoClarify the meaning of no-op highlight tag
Aleksey Kladov [Sat, 19 Dec 2020 14:16:05 +0000 (17:16 +0300)]
Clarify the meaning of no-op highlight tag

3 years agoAdd API for mapping `Attr` back to its syntax node
Jonas Schievink [Sat, 19 Dec 2020 14:15:02 +0000 (15:15 +0100)]
Add API for mapping `Attr` back to its syntax node

3 years agoMerge #6947
bors[bot] [Sat, 19 Dec 2020 14:12:07 +0000 (14:12 +0000)]
Merge #6947

6947: Use more Rustic highlighting specifiers r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUse more Rustic highlighting specifiers
Aleksey Kladov [Sat, 19 Dec 2020 14:10:47 +0000 (17:10 +0300)]
Use more Rustic highlighting specifiers

*Method* works for OO languages, but in rust we can also have
associated constants & types, so let's move this to a modifier.

3 years agoTidy up
Kirill Bulatov [Sat, 19 Dec 2020 11:27:10 +0000 (13:27 +0200)]
Tidy up

3 years agoKeep the original completion order in tests
Kirill Bulatov [Sat, 19 Dec 2020 11:18:40 +0000 (13:18 +0200)]
Keep the original completion order in tests

3 years agoAdd a slightly better fuzzy search heuristics
Kirill Bulatov [Sat, 19 Dec 2020 10:54:17 +0000 (12:54 +0200)]
Add a slightly better fuzzy search heuristics

3 years agoMerge #6944
bors[bot] [Sat, 19 Dec 2020 01:52:51 +0000 (01:52 +0000)]
Merge #6944

6944: Make attribute API more private r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMake `RawAttrs` crate-private
Jonas Schievink [Sat, 19 Dec 2020 01:44:00 +0000 (02:44 +0100)]
Make `RawAttrs` crate-private

There should be no need to use this from outside

3 years agoRemove `Attrs::merge`
Jonas Schievink [Sat, 19 Dec 2020 01:43:00 +0000 (02:43 +0100)]
Remove `Attrs::merge`

Only the `RawAttrs` version of this is in use

3 years agoMerge #6943
bors[bot] [Sat, 19 Dec 2020 01:33:23 +0000 (01:33 +0000)]
Merge #6943

6943: Remove resolved FIXME r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove resolved FIXME
Jonas Schievink [Sat, 19 Dec 2020 01:32:31 +0000 (02:32 +0100)]
Remove resolved FIXME

3 years agoMerge #6942
bors[bot] [Sat, 19 Dec 2020 00:13:27 +0000 (00:13 +0000)]
Merge #6942

6942: Minor `#[derive]` resolution cleanup r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agofixture -> ra_fixture
Jonas Schievink [Sat, 19 Dec 2020 00:12:41 +0000 (01:12 +0100)]
fixture -> ra_fixture

3 years agoTest paths to derive macros
Jonas Schievink [Sat, 19 Dec 2020 00:11:33 +0000 (01:11 +0100)]
Test paths to derive macros

3 years agoMore accurate `#[derive]` parsing
Jonas Schievink [Sat, 19 Dec 2020 00:09:48 +0000 (01:09 +0100)]
More accurate `#[derive]` parsing

This now allows full paths to the derive macro

3 years agoMerge #6937
bors[bot] [Fri, 18 Dec 2020 20:05:20 +0000 (20:05 +0000)]
Merge #6937

6937: Deduplicate highlight tags and symbol kinds r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoDeduplicate highlight tags and symbol kinds
Aleksey Kladov [Fri, 18 Dec 2020 20:00:43 +0000 (23:00 +0300)]
Deduplicate highlight tags and symbol kinds

Curiously, LSP uses different enums for those, and unsurprising and
annoyingly, there are things which exist in one but not in the other.

Let's not repeat the mistake and unify the two things

3 years agoMerge #6935
bors[bot] [Fri, 18 Dec 2020 19:38:07 +0000 (19:38 +0000)]
Merge #6935

6935: Don't look at attributes when lowering to ItemTree r=jonas-schievink a=jonas-schievink

Resolves 2 `cfg_attr` FIXMEs

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>