Florian Diebold
2d20ab7eaf
Rewrite all_super_trait_refs as an iterator
...
Doesn't fix the bug I was trying to fix, but now that I did it anyway it
seems fine to keep.
2021-04-29 20:18:41 +02:00
Florian Diebold
b384cfcb81
Handle cycles in generic_defaults more gracefully
2021-04-29 20:00:43 +02:00
Florian Diebold
184a0d7c1e
Add test for #8686
2021-04-29 20:00:21 +02:00
Comonad
78f1583bdd
fix: closure unify without check ClosureId
...
closes #8604
2021-04-29 15:26:41 +08: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
Aleksey Kladov
5c1a901035
internal: ensure that client and server-side configs are not mixed up
...
https://github.com/rust-lang/rust/issues/84647 would help big time here.
2021-04-28 13:13:30 +03:00
bors[bot]
86b5084917
Merge #8679
...
8679: fix: don't show error message for a valid notification r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-27 13:10:22 +00:00
Aleksey Kladov
f45c1ffc5b
fix: don't show error message for a valid notification
...
Closes #6782 , #6772
2021-04-27 16:09:59 +03:00
Jeremy Kolb
36c20dc23d
Return ServerNotInitialized according to the spec
...
According to the spec we should return ServerNotInitialized if the server is waiting for an initialize request and something else comes in.
Upgrading to lsp-server 0.5.1 will do this and retry until the initialize request comes in.
Fixes #8581
2021-04-27 07:47:06 -04:00
Jorge Mederos Alvarado
c4dba4077f
Add config options
2021-04-26 20:29:54 -04:00
Aleksey Kladov
f06e4b8e74
minor: simplify
2021-04-26 19:30:50 +03:00
Aleksey Kladov
363cef5c0e
fix: make error message in the status bar more useful
...
At the moment,the popup is just a bazillion of Cargo's "Compiling this\nCompiling that",
which is not that useful.
--quiet still displays error, which is what we needc
2021-04-26 19:16:07 +03:00
Kirill Bulatov
c24bdab97e
Use -u instead of --utc date flag
2021-04-26 17:12:13 +03:00
Aleksey Kladov
4f9640ff39
fix: add date to the version string on Mac
...
It doesn't support `--iso`
2021-04-26 15:20:15 +03:00
Bastian Kersting
421cf9a1bd
Fixed formatting
2021-04-26 11:37:28 +02:00
Bastian Kersting
336b81abd7
Added mutable semantic token modifier for &mut self methods
2021-04-26 09:24:18 +02:00
Danny Zhu
09fc5e1dd7
Check more carefully for cases where a rename can't be done
...
Attempting to rename an element of a tuple field would previously
replace the type with the new name, which doesn't make sense; now it
fails instead.
The check is done in both `prepare_rename` and `rename` so that the case
is caught before the user is prompted for a new name. Some other
existing failure cases are also now additionally checked in
`prepare_rename`.
2021-04-25 14:08:56 -07:00
Lukas Wirth
050c69c19d
Split out merge_imports module from helpers::insert_use
2021-04-24 13:31:43 +02:00
Aleksey Kladov
8d54fd105c
fix: correct version string to contain hash, build date and channel
2021-04-24 13:36:45 +03: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
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