Commit Graph

906 Commits

Author SHA1 Message Date
Ole Strohm
5cdbfa5b70 Added test 2022-02-22 22:48:44 +00:00
Ole Strohm
94a221ae8d Dedup code 2022-02-22 22:41:03 +00:00
Ole Strohm
43a4c45ede fix: Make match_arms assist handle doc(hidden) and non_exhaustive 2022-02-22 13:59:30 +00:00
Lukas Wirth
2e124d15fb fix: Fix expand_macro always expanding the first listed derive 2022-02-22 12:32:27 +01:00
Lukas Wirth
f13c98034b Make replace_derive_with_manual_impl work again 2022-02-22 10:20:44 +01:00
Tianyi Song
1c3d6725e2 Drop generic args in path before insert use 2022-02-22 15:41:26 +08:00
Chayim Refael Friedman
f70512cc17 Change single_let() and is_pattern_cond() to free functions 2022-02-21 08:34:36 +02:00
Chayim Refael Friedman
a1b7169b48 Update tests
Unfortunately, we lost some recovery for expressions.
2022-02-21 08:34:35 +02:00
Chayim Refael Friedman
13ac5c3491 Fix various IDE features
As a side benefit, we got `let` guard support for `move_guard` for free.
2022-02-21 08:34:35 +02:00
DropDemBits
a1a23d343a
Apply review fixes 2022-02-14 20:41:01 -05:00
DropDemBits
86c1251afb
fix: Don't drop glob with nested self 2022-02-14 19:45:31 -05:00
DropDemBits
df2eb3c7cb
fix: Don't drop tree when the other has self 2022-02-14 19:37:01 -05:00
bors[bot]
9cb6e3a190
Merge #11394
11394: feat: Deprioritize completions of private but editable definitions r=Veykril a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-02-02 11:42:40 +00:00
Lukas Wirth
2d77eb1e12 Fix test fixture 2022-02-02 12:42:13 +01:00
Lukas Wirth
70650897d8 Fix generate_function assist trying to use name-ref like keywords for names 2022-02-02 11:37:24 +01:00
bors[bot]
34138379b5
Merge #11322
11322: Extract function also extracts comments r=Vannevelj a=Vannevelj

Fixes #9011

The difficulty I came across is that the original assist works from the concept of a `ast::StmtList`, a node, but that does not allow me to (easily) represent comments, which are tokens. To combat this, I do a whole bunch of roundtrips: from the `ast::StmtList` I retrieve the `NodeOrToken`s it encompasses. 

I then cast all `Node` ones back to a `Stmt` so I can apply indentation to it, after which it is again parsed as a `NodeOrToken`.

Lastly, I add a new `make::` api that accepts `NodeOrToken` rather than `StmtList` so we can write the comment tokens.

Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
2022-02-01 23:05:28 +00:00
Jeroen Vannevel
493642ab3a
rollup match 2022-02-01 22:38:37 +00:00
Lukas Wirth
d7a544e69a fix: Complete functions and methods from block level impls 2022-02-01 23:29:40 +01:00
Jeroen Vannevel
1811f6330b
better comparison 2022-02-01 09:00:30 +00:00
Jeroen Vannevel
b290285dd8
removed redundant test 2022-02-01 00:38:33 +00:00
Jeroen Vannevel
269153388a
added FIXME 2022-02-01 00:37:48 +00:00
Jeroen Vannevel
51c50dd5ac
don't tear body 2022-02-01 00:36:50 +00:00
Jeroen Vannevel
e72ed9230a
no longer support comments on their own 2022-02-01 00:21:35 +00:00
Jeroen Vannevel
8f09e13c06 fixed whitespace 2022-01-22 13:28:23 +00:00
Jeroen Vannevel
8e8e1951e2 whitespace 2022-01-22 12:25:33 +00:00
Jeroen Vannevel
9725eaa21c generated docs 2022-01-22 12:17:24 +00:00
Jeroen Vannevel
61ab31f709 clarify doc 2022-01-22 12:10:48 +00:00
Jeroen Vannevel
4972cb759e Support standalone comments 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
8d61216957 redundant type specified 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
a1c246b1c4 shorter arms 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
4ab7c4d99b removed prints 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
96ab4c6e6c hacky_block_expr_with_comments 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
5d35e5882c removed unwrapping from indent 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
ee862cec10 simplified tail_expr 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
4896ffb65c removing unwraps 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
50c913c733 don't remove the comment token if it's last 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
4f3dd5bc08 very rough but comments get extracted 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
f662d8bf38 repro 2022-01-22 12:08:32 +00:00
Jeroen Vannevel
ffe4352d7c
styling fixes 2022-01-14 18:53:28 +00:00
Jeroen Vannevel
683de877ce
simple return 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
0700282b75
formatting 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
e5cdde95ab
removed toy 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
5e4370fe56
happy slice 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
8deadb18ae
refpat & slicepat 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
82d3238da8
ParenPat 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
c955ea11b4
support TuplePat 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
a347cb5f86
battle of the Some 2022-01-14 01:32:12 +00:00
Jeroen Vannevel
7daca6fe97
cleaning up Some 2022-01-14 01:32:11 +00:00
Jeroen Vannevel
08300284e7
removed unwrap 2022-01-14 01:32:11 +00:00
Jeroen Vannevel
7bc89f2542
formatting 2022-01-14 01:32:11 +00:00