Commit graph

15152 commits

Author SHA1 Message Date
bors[bot]
36465b34b3
Merge #7618
7618: Show qualified variant pattern completions r=Veykril a=Veykril

![UTMZyplssw](https://user-images.githubusercontent.com/3757771/107425157-e9c31800-6b1e-11eb-8963-96653115f8e0.gif)
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-09 20:37:26 +00:00
Lukas Wirth
5454559c0a Show qualified variant pattern completions 2021-02-09 21:35:02 +01:00
bors[bot]
5d4ae1c8e3
Merge #7616
7616: Show `Self` pattern and Self-prefixed enum-variant completions r=Veykril a=Veykril

![jDfQXNE0qZ](https://user-images.githubusercontent.com/3757771/107413514-1ff99b00-6b11-11eb-88b3-126cd106b514.gif)
![JpogVIgloq](https://user-images.githubusercontent.com/3757771/107413519-212ac800-6b11-11eb-8282-51115468dccc.gif)

Variant pattern completions are to be done still.

Closes #6549, at least that should address all that's left from that issue from what I can see.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-09 19:38:39 +00:00
bors[bot]
4f9a5287bf
Merge #7615
7615: Add parsing benchmark r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-09 18:53:27 +00:00
Aleksey Kladov
61f15b72ac Add parsing benchmark 2021-02-09 21:52:34 +03:00
Lukas Wirth
e92180a1d8 Show Self pattern completions for Adts if inside impls 2021-02-09 19:47:21 +01:00
Lukas Wirth
2f171ca78d Show completions for enum variant with self prefix if inside impl 2021-02-09 19:04:39 +01:00
bors[bot]
96a9ab7250
Merge #7614
7614: Unleash inner item resolution to users r=jonas-schievink a=jonas-schievink

![Peek 2021-02-09 17-30](https://user-images.githubusercontent.com/1786438/107394800-8627f300-6afc-11eb-8662-ed07226bc58f.gif)


Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-02-09 18:01:04 +00:00
Jonas Schievink
85906aa304 Remove unneeded return 2021-02-09 18:40:05 +01:00
bors[bot]
98b8285955
Merge #7613
7613: Benchmarking infrastructure r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-09 17:35:53 +00:00
Aleksey Kladov
4b1279d0b1 Infra for "unit" benchmarking 2021-02-09 20:25:39 +03:00
Jonas Schievink
51f68863b1 Remove pub 2021-02-09 17:36:10 +01:00
Jonas Schievink
e16d9dc5bd Use block_def_map in Resolver
This required a few changes to not bail out immediately if a
`ModuleScope` doesn't resolve a path.

The `LocalItemsScope` hack is now removed.
2021-02-09 17:27:04 +01:00
Jonas Schievink
34ad3d629a Teach find_path about inner items 2021-02-09 17:25:03 +01:00
Jonas Schievink
7067a22e1c Add another block def map test 2021-02-09 17:24:43 +01:00
Jonas Schievink
b9c213da7a Make with_ancestor_maps public 2021-02-09 17:23:25 +01:00
Jonas Schievink
27f77060e2 Add TestDB::module_at_position 2021-02-09 17:22:57 +01:00
Jonas Schievink
1956286368 Add expression scopes for blocks 2021-02-09 17:11:44 +01:00
bors[bot]
12c7b66a7c
Merge #7611
7611: Cleanups r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-09 15:30:09 +00:00
Aleksey Kladov
9ea2c96ddd restore accidentally deleted test 2021-02-09 18:29:15 +03:00
Aleksey Kladov
ef8f38efc6 More precise navigation to parent 2021-02-09 18:21:09 +03:00
Aleksey Kladov
2ac20b05f1 Cleanup tests 2021-02-09 18:13:11 +03:00
bors[bot]
4ae7d39f77
Merge #7597
7597: Set remote branch on xtask promote r=matklad a=lnicola

to hopefully fix this:

```
$ git switch master
Already on 'master'
Your branch is up to date with 'upstream/master'.
$ git fetch upstream
$ git reset --hard upstream/master
HEAD is now at 921ec4b3fca Auto merge of #81313 - LeSeulArtichaut:revert-32558, r=jyn514
$ git submodule update --recursive
Submodule path 'src/tools/rust-analyzer': checked out '1a59f75cdaa730c16a694a4294eccf6dfe6fe0ad'
$ git switch -c rust-analyzer-2021-02-08
Switched to a new branch 'rust-analyzer-2021-02-08'
$ git fetch origin
$ git reset --hard origin/release
HEAD is now at 336909b63 Merge #7587
$ git add src/tools/rust-analyzer
$ git commit "-m⬆️ rust-analyzer"
[rust-analyzer-2021-02-08 1774ec1a683] ⬆️ rust-analyzer
 1 file changed, 1 insertion(+), 1 deletion(-)
$ git push
fatal: The current branch rust-analyzer-2021-02-08 has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin rust-analyzer-2021-02-08

Error: command `git push` failed, exit code: 128
```

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-02-09 14:58:14 +00:00
Laurențiu Nicola
c0ff61c4b9 Track remote branch on xtask promote 2021-02-09 16:52:44 +02:00
bors[bot]
fca93cfed3
Merge #7610
7610: Cleanup test r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-09 14:49:02 +00:00
Aleksey Kladov
2dc67c85b9 Cleanup test 2021-02-09 17:48:25 +03:00
Aleksey Kladov
0f324bac6b Fix highlighting of injected attributes 2021-02-09 17:41:12 +03:00
Aleksey Kladov
5ddfde3038 Modernize tests 2021-02-09 17:23:35 +03:00
Sahandevs
91dd61b9a6 use await instead 2021-02-09 17:42:46 +03:30
bors[bot]
876c4519e3
Merge #7602
7602: Check for dyn impls in method resolution r=flodiebold a=Veykril

Fixes #6777

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-08 18:22:35 +00:00
Lukas Wirth
965d31ce5b Check for dyn impls in method resolution 2021-02-08 19:13:54 +01:00
bors[bot]
669efad231
Merge #7600
7600: Update crates r=flodiebold a=kjeremy

Pulls in https://github.com/rust-lang/chalk/pull/682

Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-02-08 16:49:45 +00:00
kjeremy
0c3b38695a Update crates
Pulls in https://github.com/rust-lang/chalk/pull/682
2021-02-08 11:38:51 -05:00
bors[bot]
a0c2bbf88f
Merge #7599
7599: Add emacs guide r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-08 16:08:31 +00:00
Aleksey Kladov
ad7b0f670a Add emacs guide 2021-02-08 19:08:02 +03:00
bors[bot]
cbb42c10d6
Merge #7595
7595: Add `config: &CargoConfig` parameter to `fn load_cargo(…)` r=matklad a=regexident

For projects using rust-analyzer as a library it is desirable to be able to provide a custom-config to `fn load_cargo(…)` to pass features, etc, rather than having to copy & paste `fn load_cargo(…)` into one's project and maintain a fork of it and keep it in sync with upstream.

Co-authored-by: Vincent Esche <regexident@gmail.com>
2021-02-08 10:34:46 +00:00
Vincent Esche
8f461ffe8f Consolidate fn load_cargo(…) parameters into struct LoadCargoConfig { … } 2021-02-08 11:30:16 +01:00
Vincent Esche
6d9c13c710 Add config: &CargoConfig parameter to fn load_cargo(…) 2021-02-08 11:00:55 +01:00
bors[bot]
433ad23988
Merge #7592
7592: [Doc] Note about Eclipse IDE support r=lnicola a=mickaelistria



Co-authored-by: Mickael Istria <mistria@redhat.com>
2021-02-08 09:16:01 +00:00
Mickael Istria
7e0854ec57 [Doc] Note about Eclipse IDE support 2021-02-08 09:52:46 +01:00
bors[bot]
a996b381bc
Merge #7593
7593: fix: add for keyword in completion #7588 r=lnicola a=gowrizrh

Fixes #7588
bors r+

Co-authored-by: Gowri <gowri.sankar@aligent.com.au>
Co-authored-by: Gowri <gowrizrh@gmail.com>
2021-02-08 08:00:41 +00:00
Gowri
6b947567e1 chore: swap order of placeholders 2021-02-08 18:22:46 +10:30
bors[bot]
984898329b
Merge #7549
7549:  Documentation: Explain how initial configuration is sent over LSP and document vim-lsp r=ilya-bobyr a=ilya-bobyr

This request contains two related but independent changes.
The first explains `rust-analyzer` initial configuration over LSP.
The second - adds documentation on `vim-lsp` Vim plugin and provides an example of the initial configuration for `rust-analyzer` when using this particular LSP client.

Let me know if you would prefer the changes to be reviewed in two separate pull requests.

Co-authored-by: Ilya Bobyr <ilya.bobyr@gmail.com>
2021-02-08 04:38:34 +00:00
Ilya Bobyr
9ffe4ca26c Vim docs: vim-lsp with initial configuration.
`vim-lsp` is another popular LSP client for Vim.  And, as there is no
`rust-analyzer` specific UI, it is non-trivial to figure out how the
initial configuration is performed.
2021-02-07 20:24:56 -08:00
Ilya Bobyr
6781692732 Explain how initial configuration is sent over LSP. 2021-02-07 20:24:56 -08:00
Gowri
498dfc45d4 ci: update relevant test case expected values 2021-02-08 10:16:20 +10:30
Gowri
7b92a55ff7 fix: add for keyword in completion #7588 2021-02-08 09:57:16 +10:30
Sahandevs
2f82a84d2a fix errors 2021-02-07 22:06:16 +03:30
Sahandevs
3a0234d60f format 2021-02-07 21:59:06 +03:30
Sahandevs
1bb4e973ff handle Thenable type rejects 2021-02-07 21:52:32 +03:30