]>
git.lizzy.rs Git - rust.git/log
kjeremy [Fri, 22 May 2020 21:13:14 +0000 (17:13 -0400)]
Remove unnecessary clone that prevented clippy from moving on
bors[bot] [Fri, 22 May 2020 18:16:28 +0000 (18:16 +0000)]
Merge #4573
4573: Chalk cleanups r=matklad a=flodiebold
- split off the `Interner` impl and the conversion code into their own modules
- use `TypeCtorId` as `AdtId` directly (instead of raw `InternId`s), and rename the type alias `StructId` -> `AdtId`
- provide missing Chalk debug impls
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Florian Diebold [Fri, 22 May 2020 16:05:48 +0000 (18:05 +0200)]
Provide missing Chalk debug methods
Florian Diebold [Fri, 22 May 2020 15:50:58 +0000 (17:50 +0200)]
Use TypeCtorId as AdtId directly, and rename the type alias StructId -> AdtId
Florian Diebold [Fri, 22 May 2020 15:14:53 +0000 (17:14 +0200)]
Split up chalk module a bit
bors[bot] [Fri, 22 May 2020 17:31:39 +0000 (17:31 +0000)]
Merge #4570
4570: Use Chalk's built-in impls r=matklad a=flodiebold
This contains two changes:
- Chalk has begun adding built-in representations of primitive types; use these in our type conversion logic. There's one somewhat 'iffy' part here, namely references; we don't keep track of lifetimes, but Chalk does, so it will expect a lifetime parameter on references. If we didn't provide that, it could cause crashes in Chalk code that expects the lifetime, so I rather hackily add an (always the same) lifetime placeholder during conversion. I expect that we'll fully switch to using Chalk's types everywhere before we add lifetime support, so I think this is the best solution for now.
- let Chalk know about well-known traits (from lang items), so it can apply its built-in impls.
Before:
```
Total expressions: 181485
Expressions of unknown type: 2940 (1%)
Expressions of partially unknown type: 2884 (1%)
Type mismatches: 901
Inference: 37.821210245s, 0b allocated 0b resident
Total: 53.399467609s, 0b allocated 0b resident
```
After:
```
Total expressions: 181485
Expressions of unknown type: 2923 (1%)
Expressions of partially unknown type: 2879 (1%)
Type mismatches: 734
Inference: 39.157752509s, 0b allocated 0b resident
Total: 54.110767621s, 0b allocated 0b resident
```
(I will start splitting up `chalk.rs` in a separate PR, since it's getting pretty big...)
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
bors[bot] [Fri, 22 May 2020 17:14:44 +0000 (17:14 +0000)]
Merge #4572
4572: Link upstream issues r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 22 May 2020 17:14:14 +0000 (19:14 +0200)]
Link upstream issues
Florian Diebold [Fri, 22 May 2020 16:52:07 +0000 (18:52 +0200)]
Add some tests for Chalk built-in trait impls
bors[bot] [Fri, 22 May 2020 16:09:37 +0000 (16:09 +0000)]
Merge #4571
4571: KISS SourceChange r=matklad a=matklad
The idea behind requiring the label is a noble one, but we are not
really using it consistently anyway, and it should be easy to retrofit
later, should we need it.
bors r+
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 22 May 2020 16:03:08 +0000 (18:03 +0200)]
KISS SourceChange
The idea behind requiring the label is a noble one, but we are not
really using it consistently anyway, and it should be easy to retrofit
later, should we need it.
bors[bot] [Fri, 22 May 2020 15:33:12 +0000 (15:33 +0000)]
Merge #4569
4569: CodeAction groups r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Florian Diebold [Fri, 22 May 2020 13:55:15 +0000 (15:55 +0200)]
Provide Chalk well-known traits
Florian Diebold [Mon, 18 May 2020 19:25:23 +0000 (21:25 +0200)]
Use Chalk's built-in representations of primitive types
For references, we make sure Chalk actually gets a lifetime here.
Aleksey Kladov [Fri, 22 May 2020 15:29:55 +0000 (17:29 +0200)]
CodeAction groups
bors[bot] [Fri, 22 May 2020 15:08:19 +0000 (15:08 +0000)]
Merge #4568
4568: Update Chalk r=matklad a=flodiebold
As always, this just makes compilation work, we don't use the newly available
functionality yet.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Florian Diebold [Fri, 22 May 2020 14:40:42 +0000 (16:40 +0200)]
Update Chalk
As always, this just makes compilation work, we don't use the newly available
functionality yet.
bors[bot] [Fri, 22 May 2020 13:12:57 +0000 (13:12 +0000)]
Merge #4516
4516: LSP: Two stage initialization r=kjeremy a=kjeremy
Fills in server information.
Derives CodeAction capabilities from the client. If code action literals
are unsupported we fall back to the "simple support" which just sends back
commands (this is already supported in our config). The difference being
that we did not adjust our server capabilities so that if the client was
checking for `CodeActionProvider: "true"` in the response that would have failed.
Part of #144
Fixes #4130 (the specific case called out in that issue)
Co-authored-by: kjeremy <kjeremy@gmail.com>
bors[bot] [Thu, 21 May 2020 22:45:18 +0000 (22:45 +0000)]
Merge #4560
4560: Use WorkspaceEdit for ssr r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 21 May 2020 22:28:49 +0000 (00:28 +0200)]
Use WorkspaceEdit for ssr
bors[bot] [Thu, 21 May 2020 18:05:58 +0000 (18:05 +0000)]
Merge #4557
4557: Formalize JoinLines protocol extension r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 21 May 2020 17:50:23 +0000 (19:50 +0200)]
Formalize JoinLines protocol extension
bors[bot] [Thu, 21 May 2020 14:14:53 +0000 (14:14 +0000)]
Merge #4553
4553: Cleanup r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 21 May 2020 14:11:37 +0000 (16:11 +0200)]
Cleanup
Aleksey Kladov [Thu, 21 May 2020 13:56:18 +0000 (15:56 +0200)]
Cleanup TextEdit
bors[bot] [Thu, 21 May 2020 13:10:00 +0000 (13:10 +0000)]
Merge #4552
4552: Transition OnEnter to WorkspaceSnippetEdit r=matklad a=matklad
This also changes our handiling of snippet edits on the client side.
`editor.insertSnippet` unfortunately forces indentation, which we
really don't want to have to deal with. So, let's just implement our
manual hacky way of dealing with a simple subset of snippets we
actually use in rust-analyzer
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 21 May 2020 12:34:27 +0000 (14:34 +0200)]
Remove dead code for handling cursor positions
Aleksey Kladov [Thu, 21 May 2020 12:26:44 +0000 (14:26 +0200)]
Transition OnEnter to WorkspaceSnippetEdit
This also changes our handiling of snippet edits on the client side.
`editor.insertSnippet` unfortunately forces indentation, which we
really don't want to have to deal with. So, let's just implement our
manual hacky way of dealing with a simple subset of snippets we
actually use in rust-analyzer
bors[bot] [Thu, 21 May 2020 12:51:52 +0000 (12:51 +0000)]
Merge #4550
4550: Fix phrasing in inlay hints settings r=matklad a=lnicola
Part of #4549
r? @LucianoBestia
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Thu, 21 May 2020 09:24:18 +0000 (12:24 +0300)]
Fix phrasing in inlay hints settings
bors[bot] [Thu, 21 May 2020 08:38:55 +0000 (08:38 +0000)]
Merge #4547
4547: Remove unused cursor positions r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 22:46:08 +0000 (00:46 +0200)]
Remove unused cursor positions
bors[bot] [Wed, 20 May 2020 23:48:02 +0000 (23:48 +0000)]
Merge #4506
4506: Make `find_path_inner` a query r=matklad a=jonas-schievink
This eliminates the remaining performance problems in the "Implement default members" assist (at least those that I've found).
Closes https://github.com/rust-analyzer/rust-analyzer/issues/4498
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
bors[bot] [Wed, 20 May 2020 23:07:23 +0000 (23:07 +0000)]
Merge #4543
4543: Remove unused cursor positions r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 22:46:08 +0000 (00:46 +0200)]
Remove unused cursor positions
bors[bot] [Wed, 20 May 2020 22:04:42 +0000 (22:04 +0000)]
Merge #4541
4541: Remove set_cursor r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 22:03:42 +0000 (00:03 +0200)]
Remove set_cursor
Aleksey Kladov [Wed, 20 May 2020 22:01:08 +0000 (00:01 +0200)]
Snippetify unwrap -> match
Jonas Schievink [Mon, 18 May 2020 22:39:50 +0000 (00:39 +0200)]
Make `find_path_inner` a query
This eliminates any remaining performance problems in the
"Implement default members" assist (at least that I've found).
Aleksey Kladov [Wed, 20 May 2020 21:50:29 +0000 (23:50 +0200)]
More snippets
bors[bot] [Wed, 20 May 2020 21:33:36 +0000 (21:33 +0000)]
Merge #4540
4540: More snippets r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 21:14:31 +0000 (23:14 +0200)]
More snippets
bors[bot] [Wed, 20 May 2020 21:23:13 +0000 (21:23 +0000)]
Merge #4526
4526: Use a flat play icon instead of the blue emoji with test code lens r=kjeremy a=aloucks
@lnicola
Restores this commit:
https://github.com/rust-analyzer/rust-analyzer/commit/
55e914a2a179aba63bd9948d6e0cf3e2a4bf5960
That was effectively wiped out by this code formatting commit:
https://github.com/rust-analyzer/rust-analyzer/commit/
dc217bdf90d555eaa1780041fc3a14e64173994d
https://github.com/rust-analyzer/rust-analyzer/commit/
3d445256fe56f4a7ead64514fb57b79079973d84
Co-authored-by: Aaron Loucks <aloucks@cofront.net>
Aleksey Kladov [Wed, 20 May 2020 21:07:17 +0000 (23:07 +0200)]
Snippetify introduce/inline var
bors[bot] [Wed, 20 May 2020 20:56:28 +0000 (20:56 +0000)]
Merge #4539
4539: Relax cursor position tests in assists r=matklad a=matklad
Those will be replaced with snippets anyway
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 20:55:37 +0000 (22:55 +0200)]
Relax cursor position tests in assists
Those will be replaced with snippets anyway
bors[bot] [Wed, 20 May 2020 19:04:02 +0000 (19:04 +0000)]
Merge #4536
4536: Fix names of launch configuration in dev docs r=kjeremy a=kuy
Follows renaming of launch configurations in https://github.com/rust-analyzer/rust-analyzer/commit/
80a42a0628f7655c3299fbf4c5a15e31990b35d3
Co-authored-by: Yuki Kodama <endflow.net@gmail.com>
bors[bot] [Wed, 20 May 2020 18:18:18 +0000 (18:18 +0000)]
Merge #4537
4537: Fix GNOME spelling r=matklad a=afranke
GNOME is a trademark. :-)
Co-authored-by: Alexandre Franke <alexandre.franke@gmail.com>
Alexandre Franke [Wed, 20 May 2020 18:11:14 +0000 (20:11 +0200)]
Fix GNOME spelling
GNOME is a trademark. :-)
Yuki Kodama [Wed, 20 May 2020 18:01:37 +0000 (03:01 +0900)]
Fix names of launch configuration in dev docs
bors[bot] [Wed, 20 May 2020 12:16:26 +0000 (12:16 +0000)]
Merge #4533
4533: More snippets r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 12:13:17 +0000 (14:13 +0200)]
Snippetify fix_visibility
Aleksey Kladov [Wed, 20 May 2020 12:00:37 +0000 (14:00 +0200)]
Snippetify fill_match_arms
Aleksey Kladov [Wed, 20 May 2020 11:48:31 +0000 (13:48 +0200)]
Don't set cursor in change_visibility
Aleksey Kladov [Wed, 20 May 2020 11:41:58 +0000 (13:41 +0200)]
Cleanup imports
bors[bot] [Wed, 20 May 2020 11:33:48 +0000 (11:33 +0000)]
Merge #4532
4532: Split change_ and fix_ visibility assists r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 11:33:13 +0000 (13:33 +0200)]
Split change_ and fix_ visibility assists
bors[bot] [Wed, 20 May 2020 11:03:18 +0000 (11:03 +0000)]
Merge #4520
4520: Marks 2.0 r=matklad a=matklad
The main benefit here is that we no longer need to declare marks. The main drawback is that this is ~~glorious~~ horrible. WDYT?
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 10:59:20 +0000 (12:59 +0200)]
Switch to new magic marks
Aleksey Kladov [Wed, 20 May 2020 09:54:57 +0000 (11:54 +0200)]
Remove cross-crate marks
They create quite a bit of friction. Really, we should just move the
tests to the same crate, rather than paper over existing split.
Aleksey Kladov [Tue, 19 May 2020 22:19:59 +0000 (00:19 +0200)]
Significantly more glorious marks
bors[bot] [Wed, 20 May 2020 09:10:52 +0000 (09:10 +0000)]
Merge #4530
4530: Use snippets in change_return_type_to_result r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 09:10:15 +0000 (11:10 +0200)]
Use snippets in change_return_type_to_result
bors[bot] [Wed, 20 May 2020 08:52:34 +0000 (08:52 +0000)]
Merge #4529
4529: Fix Some|None order in fill_match_arms r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 08:51:48 +0000 (10:51 +0200)]
Fix Some|None order in fill_match_arms
Aleksey Kladov [Wed, 20 May 2020 08:30:18 +0000 (10:30 +0200)]
wip
Aleksey Kladov [Wed, 20 May 2020 08:28:58 +0000 (10:28 +0200)]
Cleanup
Aleksey Kladov [Wed, 20 May 2020 08:26:14 +0000 (10:26 +0200)]
Minor
Aleksey Kladov [Wed, 20 May 2020 08:20:21 +0000 (10:20 +0200)]
Minor
Aleksey Kladov [Wed, 20 May 2020 08:17:46 +0000 (10:17 +0200)]
Snippetify add_new
bors[bot] [Wed, 20 May 2020 07:57:49 +0000 (07:57 +0000)]
Merge #4528
4528: Debug lens fix for a binary. r=matklad a=vsrs
Fixes an issue reported here: https://github.com/rust-analyzer/rust-analyzer/pull/4222#issuecomment-
631073448
Co-authored-by: vsrs <vit@conrlab.com>
bors[bot] [Wed, 20 May 2020 07:22:53 +0000 (07:22 +0000)]
Merge #4505
4505: Infer return type of loops with value breaks r=flodiebold a=ruabmbua
Creates a type variable to represent the return value of the loop.
Uses `coerce_merge_branch` on each break with the previous value, to determine the actual return value of the loop.
Resolves: https://github.com/rust-analyzer/rust-analyzer/issues/4492 , https://github.com/rust-analyzer/rust-analyzer/issues/4512
Co-authored-by: Roland Ruckerbauer <roland.rucky@gmail.com>
vsrs [Wed, 20 May 2020 06:42:00 +0000 (09:42 +0300)]
Debug lens fix for a binary.
Aaron Loucks [Wed, 20 May 2020 00:29:49 +0000 (20:29 -0400)]
Use a flat play icon instead of the blue emoji with test code lens
bors[bot] [Wed, 20 May 2020 00:11:25 +0000 (00:11 +0000)]
Merge #4525
4525: Better cursor placement when adding impl members r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 May 2020 00:07:21 +0000 (02:07 +0200)]
Better cursor placement when adding impl members
bors[bot] [Tue, 19 May 2020 23:54:08 +0000 (23:54 +0000)]
Merge #4524
4524: Use snippets in add_missing_members r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 19 May 2020 23:53:21 +0000 (01:53 +0200)]
Use snippets in add_missing_members
bors[bot] [Tue, 19 May 2020 23:30:48 +0000 (23:30 +0000)]
Merge #4521 #4522
4521: Use snippets in add_function r=matklad a=matklad
bors r+
🤖
4522: Explain the purpose of `ast::make` module more clearly r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 19 May 2020 21:12:01 +0000 (23:12 +0200)]
Moderate cleanup of add_function
Aleksey Kladov [Tue, 19 May 2020 23:28:11 +0000 (01:28 +0200)]
Explain the purpose of `ast::make` module more clearly
Aleksey Kladov [Tue, 19 May 2020 20:25:07 +0000 (22:25 +0200)]
Use snippets in add function
Aleksey Kladov [Tue, 19 May 2020 19:43:14 +0000 (21:43 +0200)]
Cleanup
Aleksey Kladov [Tue, 19 May 2020 19:40:47 +0000 (21:40 +0200)]
Cleanup
Aleksey Kladov [Tue, 19 May 2020 19:39:27 +0000 (21:39 +0200)]
Use new format for all assists that don't change cursor positon
bors[bot] [Tue, 19 May 2020 22:50:26 +0000 (22:50 +0000)]
Merge #4519
4519: Fix client-side snippets r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 19 May 2020 22:49:08 +0000 (00:49 +0200)]
Fix client-side snippets
bors[bot] [Tue, 19 May 2020 22:27:55 +0000 (22:27 +0000)]
Merge #4518
4518: New assist: add turbo fish r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 19 May 2020 22:07:00 +0000 (00:07 +0200)]
New assist: add turbo fish
kjeremy [Tue, 19 May 2020 22:12:07 +0000 (18:12 -0400)]
Add version
kjeremy [Tue, 19 May 2020 21:22:38 +0000 (17:22 -0400)]
Fill code action capabilities with a function
Roland Ruckerbauer [Tue, 19 May 2020 20:52:15 +0000 (22:52 +0200)]
Apply suggestion of @flodiebold: Get rid of multiple unwraps
Roland Ruckerbauer [Tue, 19 May 2020 19:49:45 +0000 (21:49 +0200)]
loop return value inference: add tests
Roland Ruckerbauer [Tue, 19 May 2020 19:18:43 +0000 (21:18 +0200)]
Move false negative expr_diverges_missing_arm() to working tests
Roland Ruckerbauer [Tue, 19 May 2020 19:03:59 +0000 (21:03 +0200)]
loop return value inference: coerce_merge branches
bors[bot] [Tue, 19 May 2020 18:29:46 +0000 (18:29 +0000)]
Merge #4494
4494: Support snippet text edit r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 19 May 2020 18:27:14 +0000 (20:27 +0200)]
Update test data
Aleksey Kladov [Sun, 17 May 2020 23:53:55 +0000 (01:53 +0200)]
Implement client-side of SnippetTextEdit
Aleksey Kladov [Sun, 17 May 2020 22:11:40 +0000 (00:11 +0200)]
Server side of SnippetTextEdit
Aleksey Kladov [Sun, 17 May 2020 19:24:33 +0000 (21:24 +0200)]
Add snippetTextEdit protocol extension