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
Lukas Wirth
1e88f5ec8e
Simplify highlight token match guards
2021-04-23 17:27:18 +02:00
Lukas Wirth
ef6f596b4b
Sort HlMod variants and ALL const
2021-04-23 17:24:58 +02:00
Lukas Wirth
c005ce60a0
Tag yield
and await
as ControlFlow in semantic highlighting
2021-04-23 17:24:45 +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
unexge
5e765895cf
Add missing test case for "Convert to named struct" assist
2021-04-23 16:18:10 +03:00
unexge
97270dfb91
Stop iterating reference after made an edit in "Convert to named struct" assist
2021-04-23 13:08:07 +03:00
bors[bot]
07fb65abb8
Merge #8628
...
8628: minor: Add one more profiling span to add_dep r=lnicola a=lnicola
CC #8623
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-04-22 18:48:53 +00:00
Laurențiu Nicola
c37ca7841c
Add one more profiling span to add_dep
2021-04-22 21:48:17 +03:00
bors[bot]
e529f73355
Merge #8627
...
8627: Add profiling spans under cargo_to_crate_graph r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-04-22 18:26:09 +00:00
Laurențiu Nicola
6b187af337
Add profiling spans under cargo_to_crate_graph
2021-04-22 21:25:29 +03:00
bors[bot]
0bb074aa26
Merge #8620
...
8620: Remove unnecessary braces for extracted block expression r=Veykril a=brandondong
This change addresses the first bullet point of https://github.com/rust-analyzer/rust-analyzer/issues/7839 .
Specifically, when extracting block expressions, remove the unneeded extra braces inside the generated function.
Co-authored-by: Brandon <brandondong604@hotmail.com>
2021-04-22 15:22:43 +00:00
unexge
affd8d3518
Move reference editing logic into own function to make error handling more ease in "Convert to named struct" assist
2021-04-22 11:33:56 +03:00
Brandon
1713f4c7cd
Remove unnecessary braces for extracted block expression
2021-04-21 23:39:35 -07:00
Lukas Wirth
d5c9de65c5
Don't filter equal nodes in reorder assists
2021-04-22 00:54:31 +02:00
James Leitch
72718bc2d7
Code review feedback.
2021-04-21 15:10:53 -07:00
James Leitch
9fcad82980
Diagnostic Remap Path Prefixes added.
2021-04-21 15:10:53 -07:00
James Leitch
60841f4276
Diagnostic paths attempt to use VSCode's path join behavior before defaulting to Rust's path join behavior.
2021-04-21 15:10:53 -07:00
bors[bot]
32491c0978
Merge #8570
...
8570: Flycheck tries to parse both Cargo and Rustc messages. r=rickvanprim a=rickvanprim
This change allows non-Cargo build systems to be used for Flycheck provided they call `rustc` with `--error-format=json` and emit those JSON messages to `stdout`.
Co-authored-by: James Leitch <rickvanprim@gmail.com>
2021-04-21 21:56:54 +00:00
bors[bot]
b21701c5ee
Merge #8616
...
8616: minor: Bump deps r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-04-21 16:20:56 +00:00
Laurențiu Nicola
27c5e2da48
Bump chalk
2021-04-21 19:20:01 +03:00
Laurențiu Nicola
e50ca6b067
Bump rustc_lexer
2021-04-21 19:19:27 +03:00
Jonas Schievink
0414b65319
Remove ItemTree::all_inner_items
2021-04-21 18:10:25 +02:00
Jonas Schievink
7b7d051e81
Add failing local items test
2021-04-21 17:57:45 +02:00
unexge
322cd1fa7f
Use multiple loops instead of Iterator::chain
in FindUsages
2021-04-21 16:42:47 +03:00
unexge
6630266ce1
Add multi file test for "Convert to named struct" assist
2021-04-21 16:20:08 +03:00
unexge
96d694062b
Remove unwrap
s in "Convert to named struct" assist
2021-04-21 16:01:13 +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
unexge
e0a60e71d7
Add larger example for "Convert to named struct" assist
2021-04-21 10:57:36 +03:00
unexge
53599d11f6
Fix incorrectly replacing method calls in "Convert to named struct" assist
2021-04-21 10:27:26 +03:00
Aleksey Kladov
cdfe5a8be0
fix: no more Registering progress handler for token rustAnalyzer/Indexing failed.
2021-04-20 22:54:05 +03:00
Lukas Wirth
b290cd5782
Add cov_marks to insert_use tests
2021-04-20 19:34:43 +02:00
Lukas Wirth
2c8f1b5c30
Rewrite extract_struct_from_enum_variant assist
2021-04-20 17:36:42 +02:00
bors[bot]
ad131049c4
Merge #8600
...
8600: fix: no longer get stuck on windows r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-20 15:05:33 +00:00
Aleksey Kladov
1772eb0f1a
fix: no longer get stuck on windows
...
reading both stdout & stderr is a common gotcha, you need to drain them
concurrently to avoid deadlocks. Not sure why I didn't do the right
thing from the start. Seems like I assumed the stderr is short? That's
not the case when cargo spams `compiling xyz` messages
2021-04-20 18:02:54 +03:00
bors[bot]
86c2bb3c5b
Merge #8602
...
8602: Fix panic in `replace_derive_with_manual_impl` r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-04-20 14:27:08 +00:00
Jonas Schievink
c0ad9b3581
Follow testing style guide
2021-04-20 16:26:07 +02:00
Jonas Schievink
6624158969
Fix panic in replace_derive_with_manual_impl
2021-04-20 16:25:24 +02:00
Jonas Schievink
d699371f5f
"Inline variable" when on a use of the variable
2021-04-20 16:16:23 +02:00
Lukas Wirth
fa20a5064b
Remove SyntaxRewriter usage in insert_use in favor of ted
2021-04-20 02:09:12 +02:00
Lukas Wirth
e8744ed9bb
Replace SyntaxRewriter usage with ted in reorder_impl assist
2021-04-20 02:08:21 +02:00
James Leitch
b3a7953cae
Code review feedback.
2021-04-19 12:26:04 -07:00
bors[bot]
b6a7276c54
Merge #8586
...
8586: Replace SyntaxRewriter usage with ted in eager::eager_macro_recur r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-19 18:03:56 +00:00
Jonas Schievink
ec05186378
Add autoimport test with inner items
2021-04-19 19:53:29 +02:00
Jonas Schievink
59630977a5
Fix some find_path bugs around inner items
2021-04-19 19:50:11 +02:00
Lukas Wirth
952fc23694
Replace SyntaxRewriter with ted in exppand_macro::expand_macro_recur
2021-04-19 19:43:26 +02:00
Lukas Wirth
617cd7231c
Remove SyntaxRewriter usage in eager::eager_macro_recur
2021-04-19 19:28:41 +02:00
bors[bot]
0741de87e7
Merge #8584
...
8584: internal: fix slightly broken test r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-19 16:04:44 +00:00