Trevor Spiteri
2d0a949236
Use back ticks instead of single quotes around code
2020-05-14 01:06:07 +02:00
bors[bot]
0063ad970d
Merge #4358
...
4358: add if let and while let postfix for Option and Result #4348 r=matklad a=bnjjj
close #4348
I also added `while let` for iterator or stream it could be useful
![iflet](https://user-images.githubusercontent.com/5719034/81278000-676c6b80-9055-11ea-87ad-6b8476dd983f.gif )
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-11 18:08:26 +00:00
bors[bot]
a3dbd272e0
Merge #4406 #4410 #4411 #4417
...
4406: Update cargo-metadata r=matklad a=edwin0cheng
This PR update `cargo-metadata` to 0.10.0 and it also relax the` serde-derive` deps to 1.0 for tests in `proc-macro-srv`.
cc @robojumper
r= @matklad , I think you would have something to say related to https://github.com/serde-rs/json/issues/647#issue-593788429 ?
4410: Improve wording in comment r=matklad a=edwin0cheng
4411: do not remove then block when you unwrap else block #4361 r=matklad a=bnjjj
close #4361
4417: Omit default types in HirDisplay SourceCode mode r=matklad a=TimoFreiberg
Closes #4390
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
2020-05-10 17:37:07 +00:00
Timo Freiberg
cbbbd48325
Omit default types in HirDisplay SourceCode mode
2020-05-10 18:10:15 +02:00
Benjamin Coenen
98a7bb2435
do not remove then block when you unwrap else block #4361
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-10 15:31:51 +02:00
Benjamin Coenen
92b2230fef
add if let and while let postfix for Option and Result
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-10 12:45:35 +02:00
bors[bot]
f1cb5b8a29
Merge #4392
...
4392: Add From should not move the cursor r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-09 14:22:06 +00:00
Aleksey Kladov
d9828a57fc
Add From should not move the cursor
2020-05-09 16:21:10 +02:00
Aleksey Kladov
e201e7834d
Ascribe more correct types
2020-05-09 15:57:53 +02:00
Aleksey Kladov
5c04d8544c
unindent -> dedent
2020-05-09 14:48:43 +02:00
Aleksey Kladov
231fddab54
More fluent indent API
2020-05-09 14:40:11 +02:00
Aleksey Kladov
c6334285e3
Fix visibility
2020-05-09 13:59:25 +02:00
Timo Freiberg
64e6b8200b
Use new HirDisplay variant in add_function assist
2020-05-08 17:14:45 +02:00
Aleksey Kladov
1e790ea314
Simplify
2020-05-07 17:32:01 +02:00
Aleksey Kladov
28fcff125a
Nicer API
2020-05-07 17:29:23 +02:00
Aleksey Kladov
c6b81bc013
Rename AssitLabel -> Assist
2020-05-07 17:18:28 +02:00
Aleksey Kladov
4867968d22
Refactor assists API to be more convenient for adding new assists
...
It now duplicates completion API in its shape.
2020-05-07 16:27:54 +02:00
Benjamin Coenen
51c02ab84f
add Ok wrapping
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-06 17:45:55 +02:00
Aleksey Kladov
020ca6695f
Simplify
2020-05-06 16:39:11 +02:00
Aleksey Kladov
0970c3454b
Rename
2020-05-06 16:10:35 +02:00
Aleksey Kladov
fdd4df97ba
Use SourceChange for assists
2020-05-06 15:43:47 +02:00
Aleksey Kladov
1116c9a0e9
Fix TODO
2020-05-06 13:21:49 +02:00
Aleksey Kladov
233f01c9ba
Move target to AssistLabel
...
Target is used for assists sorting, so we need it before we compute
the action.
2020-05-06 12:51:28 +02:00
Aleksey Kladov
eea431180e
Regenerate
2020-05-06 10:21:35 +02:00
Aleksey Kladov
d308ff910b
Merge doc_tests and tests
2020-05-06 10:18:12 +02:00
Aleksey Kladov
25e6bbde01
Merge assits::test_helpers and tests
2020-05-06 10:16:55 +02:00
Aleksey Kladov
ca9e0f5fe9
Fixup tests
2020-05-05 23:48:26 +02:00
Aleksey Kladov
4a6fa8f0df
Rename AtomTextEdit -> Indel
2020-05-05 23:15:49 +02:00
Aleksey Kladov
381cbc6088
Minor cleanups
2020-05-05 22:14:01 +02:00
Aleksey Kladov
df00da15c4
Fix compilation
2020-05-05 20:45:44 +02:00
Aleksey Kladov
aee22c73c3
Move group_label where it belongs
2020-05-05 20:42:52 +02:00
Aleksey Kladov
6c2414430a
use GroupLabel for type safety
2020-05-05 20:34:45 +02:00
Aleksey Kladov
d5b9282ede
Minor rename
2020-05-05 20:33:10 +02:00
Aleksey Kladov
13c078db9c
Flip Assist::new arguments
2020-05-05 20:30:33 +02:00
Edwin Cheng
92665358cd
Rename ImplItem to AssocItem
2020-05-05 23:56:10 +08:00
bors[bot]
f68e099777
Merge #4265
...
4265: Make `change_visibility` assist work for tuple struct fields r=matklad a=Jesse-Bakker
Fixes #4206
Co-authored-by: Jesse Bakker <git@jessebakker.com>
2020-05-05 14:42:33 +00:00
Aleksey Kladov
d7450222a9
Simplify
2020-05-04 14:55:24 +02:00
Aleksey Kladov
802617ccc2
Simplify
2020-05-04 14:16:10 +02:00
Edwin Cheng
2034002413
Support auto-import in macro
2020-05-03 03:24:55 +08:00
Jesse Bakker
b5c330bf5a
Make change_visibility
assist work for tuple struct field visibility
2020-05-02 18:25:38 +02:00
Benjamin Coenen
6d5f3922f7
Add unwrap block assist #4156
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-02 12:31:11 +02:00
Benjamin Coenen
0b40876b99
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
2020-05-02 12:25:04 +02:00
Benjamin Coenen
eea21738ab
Add unwrap block assist #4156
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-02 12:20:39 +02:00
Aleksey Kladov
b73dbbfbf2
Add missing members generates indented blocks
2020-05-02 11:53:07 +02:00
Aleksey Kladov
4f2134cc33
Introduce EffectExpr
2020-05-02 11:21:39 +02:00
Benjamin Coenen
df7899e47a
Add unwrap block assist #4156
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-01 16:41:29 +02:00
Benjamin Coenen
dc34162450
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
2020-05-01 16:26:30 +02:00
Edwin Cheng
44f5e2048c
Remove lower_path from AssistCtx to Semantic
2020-05-01 20:05:12 +08:00
Edwin Cheng
bdcf6f5658
Introduce LowerCtx for path lowering
2020-05-01 20:01:17 +08:00
Benjamin Coenen
bbe22640b8
Add unwrap block assist #4156
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-29 14:53:47 +02:00