Lukas Wirth
31aad2528f
Fix edge case for ImportGranularity guessing
2021-06-08 22:14:30 +02:00
Clemens Wasser
629e8d1ed0
Apply more clippy suggestions and update generated
2021-06-03 12:46:56 +02:00
Lukas Wirth
f3dc4321c8
Account for generics in extract_struct_from_enum_variant
2021-06-02 17:44:00 +02:00
Aleksey Kladov
ee51bf04be
minor: remove debug print
2021-05-31 20:20:30 +03:00
bors[bot]
f41b68637a
Merge #9062
...
9062: internal: Bump deps r=lnicola a=lnicola
Fixes #9061
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-05-30 11:48:59 +00:00
Laurențiu Nicola
36567eb9be
Bump deps
2021-05-30 14:48:10 +03:00
Lukas Wirth
fc37e2f953
Attribute completion is context aware
2021-05-27 23:28:14 +02:00
Domantas Jadenkus
22e5194396
generate match arms with todo!() as placeholder body
2021-05-24 22:17:16 +03:00
Laurențiu Nicola
b43bc61981
Bump rustc_lexer
2021-05-24 16:39:19 +03:00
Aleksey Kladov
188b0f96f9
Add more docs
2021-05-22 16:53:47 +03:00
Aleksey Kladov
47d7434dde
internal: replace AstTransformer with mutable syntax trees
2021-05-22 15:27:32 +03:00
Lukas Tobias Wirth
da7f1eb756
Don't compare ast::Visibility by stringifying
2021-05-20 17:45:59 +02:00
Aleksey Kladov
75a0123614
fix: don't add extra whitespace around fields
...
closes #8785
2021-05-17 12:45:01 +03:00
Aleksey Kladov
1859df37fd
internal: use mutable syntax trees when filling fields
2021-05-16 18:10:56 +03:00
Aleksey Kladov
e4a7b44e55
internal: use mutable trees when filling match arms
2021-05-16 15:10:18 +03:00
bors[bot]
a57bd59f35
Merge #8813
...
8813: Get some more array lengths! r=lf- a=lf-
This is built on #8799 and thus contains its changes. I'll rebase it onto master when that one gets merged. It adds support for r-a understanding the length of:
* `let a: [u8; 2] = ...`
* `let a = b"aaa"`
* `let a = [0u8; 4]`
I have added support for getting the values of byte strings, which was not previously there. I am least confident in the correctness of this part and it probably needs some more tests, as we currently have only one test that exercised that part (!).
Fixes #2922 .
Co-authored-by: Jade <software@lfcode.ca>
2021-05-16 01:53:12 +00:00
Lukas Wirth
4b5b54279a
Attach comments to ast::Impl
2021-05-15 17:32:28 +02:00
Aleksey Kladov
883dd1568f
internal: use more mutable APIs
2021-05-14 20:00:35 +03:00
Aleksey Kladov
cea589b3b5
internal: rewrite assoc item manipulaion to use mutable trees
2021-05-14 18:47:08 +03:00
Aleksey Kladov
73123a7550
internal: remove SyntaxRewriter
2021-05-14 16:40:11 +03:00
Aleksey Kladov
873717190d
internal: remove more of the SyntaxRewriter
2021-05-14 16:28:59 +03:00
Aleksey Kladov
0650f77dd9
internal: remove one more immutable tree
2021-05-14 16:19:27 +03:00
Aleksey Kladov
ad0648dc95
Cleanup imports
2021-05-13 13:44:47 +03:00
Jade
73023c0299
Support length for ByteStrings
...
I am not confident that my added byte string parsing is right.
2021-05-12 21:22:46 -07:00
Aleksey Kladov
bf26e13cd2
simplify
2021-05-10 15:25:56 +03:00
Aleksey Kladov
4f3c0adc5a
internal: introduce ast::make::ext
module with common shortcuts
...
There's a tension between keeping a well-architectured minimal
orthogonal set of constructs, and providing convenience functions.
Relieve this pressure by introducing an dedicated module for
non-orthogonal shortcuts.
This is inspired by the django.shortcuts module which serves a similar
purpose architecturally.
2021-05-09 19:55:43 +03:00
Aleksey Kladov
680a0d54e4
internal: fix make API
2021-05-09 19:22:33 +03:00
Aleksey Kladov
5342800147
internal: rewrite **Repalce impl Trait** assist to mutable syntax trees
2021-05-09 18:20:37 +03:00
Aleksey Kladov
d9c9f6dc2c
cleanups
2021-05-09 17:58:03 +03:00
Aleksey Kladov
8a7904127d
minor: remove dead code
2021-05-08 23:28:36 +03:00
Aleksey Kladov
1755b57e1a
internal: pull_assignment_up uses mutable trees
2021-05-08 23:11:42 +03:00
Aleksey Kladov
880ddddfe6
dead code
2021-05-08 20:02:48 +03:00
Aleksey Kladov
1fdc9d8e9e
internal: remove one more syntax rewriter
2021-05-08 14:47:14 +03:00
Jonas Schievink
e2b664e9fd
fix: use raw idents in make::name{_ref}
with keywords
2021-05-07 17:22:54 +02:00
Dawer
0a156c80af
Hide implementation details of TokenText
2021-05-06 10:07:06 +05:00
Dawer
d9b4ac8128
Clean up
2021-05-06 10:07:06 +05:00
Dawer
d7e169fe55
Borrow text from nodes of immutable syntax trees
2021-05-06 10:07:06 +05:00
Dawer
dc4fa504ea
Adapt to a new rowan borrowing node API.
2021-05-06 10:06:52 +05:00
Dawer
52143f389f
Update to rowan 0.13.0-pre.5
2021-05-06 10:04:39 +05:00
Jonas Schievink
cb8632d87c
Parse const param defaults
2021-04-29 03:07:53 +02:00
Jonas Schievink
caee3a2eeb
Correctly parse negated literals as const args
2021-04-29 02:27:55 +02:00
Lukas Wirth
050c69c19d
Split out merge_imports module from helpers::insert_use
2021-04-24 13:31:43 +02:00
bors[bot]
5cbde9f531
Merge #8591 #8638
...
8591: Remove SyntaxRewriter usage in insert_use in favor of mutable syntax trees r=matklad a=Veykril
Unfortunately changing `insert_use` to not use `SyntaxRewriter` creates a lot of changes since so much relies on that. But on the other hand this should be the biggest usage of `SyntaxRewriter` I believe.
8638: Remove SyntaxRewriter::from_fn r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-23 16:49:08 +00:00
Lukas Wirth
e6e4417bbb
Remove SyntaxRewriter::from_fn
2021-04-23 18:36:43 +02:00
bors[bot]
85bab7539a
Merge #8317
...
8317: Convert tuple struct to named struct assist r=Veykril a=unexge
Closes https://github.com/rust-analyzer/rust-analyzer/issues/8192
Co-authored-by: unexge <unexge@gmail.com>
2021-04-23 13:37:48 +00:00
Laurențiu Nicola
e50ca6b067
Bump rustc_lexer
2021-04-21 19:19:27 +03:00
Comonad
09147c3303
Add support for fill match arms of boolean values
...
- Add support for boolean inside tuple
2021-04-21 19:33:45 +08:00
Lukas Wirth
3f7a086b4f
Parse outer atttributes for RecordPatField
2021-04-21 11:08:15 +02:00
Lukas Wirth
fa20a5064b
Remove SyntaxRewriter usage in insert_use in favor of ted
2021-04-20 02:09:12 +02:00
bors[bot]
6877e6e4da
Merge #8578
...
8578: fix: false positive about inner attrs in docs r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-19 14:37:54 +00:00