Steven Joruk
5b712bd821
feat: Add an assist for inlining type aliases
...
This intends to lead to a more useful assist to replace all users of an
alias with its definition.
2022-03-12 13:42:24 +00:00
Lukas Wirth
e5bb661b7a
Highlight Self
as a keyword by default
2022-03-06 00:13:45 +01:00
Lukas Wirth
c0d6471143
fix: Recognize Self
as a proper keyword
2022-03-05 23:20:06 +01:00
hkalbasi
4fa8749c44
Preserve order of generic args
2022-03-04 11:46:14 +03:30
Laurențiu Nicola
87c4a4104d
Fix body selection in while loops
2022-02-26 16:45:06 +02:00
Lukas Wirth
f13c98034b
Make replace_derive_with_manual_impl work again
2022-02-22 10:20:44 +01: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
de8633f15f
Parse let
expressions in order to support let
chains
...
We still need to reject freestanding `let` expressions: see https://github.com/rust-analyzer/rust-analyzer/issues/11320#issuecomment-1018212465 .
2022-02-21 08:34:34 +02:00
Lukas Wirth
6940cca760
Move attribute path completions into attribute completion module
2022-02-03 15:50:14 +01:00
Lukas Wirth
cc04cfc982
Reduce allocations in attribute collection
2022-01-30 22:18:32 +01:00
Jonas Schievink
3dd5e273b6
Shrink diagnostic spans for errors inside macros
2022-01-08 15:40:42 +01:00
Lukas Wirth
81163b8cd4
fix: Fix attribute stripping ignoring doc comments
2022-01-07 18:51:10 +01:00
Lukas Wirth
08adce61a1
Better interface for doc comment and attribute processing
2022-01-07 14:14:33 +01:00
Lukas Wirth
69dbfc7754
Generate AnyHasDocComments
node
2022-01-07 12:38:18 +01:00
Jonas Schievink
9dd42cd1e1
Useconst _
instead of mod __
2022-01-06 12:55:33 +01:00
Jonas Schievink
3ff68f25b8
Expand attribute macros on impl and trait items
2022-01-06 12:30:16 +01:00
Lukas Wirth
c93983e76f
Fix for-loop expressions breaking with BlockExpr iterable
2021-10-30 16:37:32 +02:00
Aramis Razzaghipour
9583dd5725
Replace if let
with match
where appropriate
2021-10-05 09:00:21 +11:00
Aramis Razzaghipour
eff195852d
Fix miscellaneous Clippy lints
2021-10-03 23:53:30 +11:00
Aleksey Kladov
7dbf24fc7a
minor: dead code
2021-10-02 15:42:10 +03:00
Aleksey Kladov
d5c5b7cd12
internal: remove deprecated method
2021-10-02 15:28:55 +03:00
Lukas Wirth
b6ed91a6de
Rename *Owner
traits to Has*
2021-09-27 12:54:24 +02:00
Lukas Wirth
a28c5d7311
Rename Dyn*
nodes to Any*
nodes
2021-09-27 12:45:36 +02:00
Aleksey Kladov
2bf81922f7
internal: more reasonable grammar for blocks
...
Consider these expples
{ 92 }
async { 92 }
'a: { 92 }
#[a] { 92 }
Previously the tree for them were
BLOCK_EXPR
{ ... }
EFFECT_EXPR
async
BLOCK_EXPR
{ ... }
EFFECT_EXPR
'a:
BLOCK_EXPR
{ ... }
BLOCK_EXPR
#[a]
{ ... }
As you see, it gets progressively worse :) The last two items are
especially odd. The last one even violates the balanced curleys
invariant we have (#10357 ) The new approach is to say that the stuff in
`{}` is stmt_list, and the block is stmt_list + optional modifiers
BLOCK_EXPR
STMT_LIST
{ ... }
BLOCK_EXPR
async
STMT_LIST
{ ... }
BLOCK_EXPR
'a:
STMT_LIST
{ ... }
BLOCK_EXPR
#[a]
STMT_LIST
{ ... }
2021-09-26 19:16:09 +03:00
Lukas Wirth
151afdfe5c
Remove inherent methods from ast node that carry semantic meaning
2021-09-26 16:49:03 +02:00
Lukas Wirth
42eb4efb5b
Cleanup
2021-09-23 16:28:03 +02:00
Lukas Wirth
b36f12dba5
Simplify
2021-09-21 16:05:21 +02:00
Lukas Wirth
6d6e0b8f21
Generate ast nodes for each ast trait
2021-09-21 15:52:11 +02:00
Lukas Wirth
3b7c713af3
Implement if_to_bool_then assist
2021-08-08 17:56:34 +02:00
Lukas Wirth
c4a119f433
Simplify
2021-08-07 22:16:15 +02:00
bors[bot]
80f522091a
Merge #9790
...
9790: fix: extract_type_alias extracts generics correctly r=Veykril a=Veykril
Fixes #8335
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-05 00:54:49 +00:00
Lukas Wirth
b6d574642d
extract_type_alias extracts generics correctly
2021-08-05 02:54:06 +02:00
Jade
e3a67ccec6
tree-wide: fix rustdoc warnings, add some links
2021-08-03 21:34:20 -07:00
Lukas Wirth
778e6e8ba8
add_explicit_type is applicable for closure parameters
2021-07-31 14:04:34 +02:00
Lukas Wirth
b21f66fce3
Simplify extract_function assist
2021-07-29 22:07:56 +02:00
Lukas Wirth
b537cb186e
Use more strictly typed syntax nodes for analysis in extract_function assist
2021-07-29 17:26:37 +02:00
Lukas Wirth
dfdf6fd9f8
Fix some more basic clippy lints
2021-07-21 20:52:08 +02:00
Lukas Wirth
d308f17a21
Inline parameters in inline_call
if possible
2021-07-03 20:05:54 +02:00
Lukas Wirth
251f0c6090
replace_match_with_if_let
works on more binary matches
2021-07-02 21:05:10 +02:00
Lukas Wirth
04f1104179
Don't classify NameRef paths inside attribute TokenTrees
2021-06-30 21:51:28 +02:00
Lukas Wirth
3ce5c66ca1
Deduplicate ast expression walking logic
2021-06-27 01:11:57 +02:00
Lukas Wirth
344cb5e76a
Don't insert imports outside of cfg attributed items
2021-06-18 23:56:43 +02:00
Lukas Wirth
2ee090faaf
Allow to disable import insertion on single path glob imports
2021-06-18 23:11:56 +02:00
Lukas Wirth
cd5f4121e3
Create modules in correct directory for nested modules in move_module assist
2021-06-17 12:09:28 +02:00
Lukas Wirth
29054e02fb
Highlight unsafe trait refs as unsafe only in impl blocks and definitions
2021-06-15 21:49:59 +02:00
Jonas Schievink
1d6eef1350
Update ungrammar
2021-06-11 18:34:30 +02:00
Lukas Wirth
31aad2528f
Fix edge case for ImportGranularity guessing
2021-06-08 22:14:30 +02:00
Lukas Wirth
fc37e2f953
Attribute completion is context aware
2021-05-27 23:28:14 +02:00
Lukas Tobias Wirth
da7f1eb756
Don't compare ast::Visibility by stringifying
2021-05-20 17:45:59 +02:00
Dawer
0a156c80af
Hide implementation details of TokenText
2021-05-06 10:07:06 +05:00