Aleksey Kladov
5a42e6bff5
Explain how we get precise spans for diagnostics.
2020-11-28 18:14:08 +03:00
bors[bot]
b7ece77af4
Merge #6650
...
6650: Make completion and assists module independent r=matklad a=SomeoneToIgnore
A follow-up of https://github.com/rust-analyzer/rust-analyzer/pull/6553#discussion_r524402907
Move the common code for both assists and completion modules into a separate crate.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-11-28 14:33:57 +00:00
Kirill Bulatov
3f612d37c6
Move the helpers into ide_db
2020-11-28 16:30:39 +02:00
Jonas Schievink
f52abbe62d
Coalesce flycheck events
2020-11-27 22:52:22 +01:00
Jonas Schievink
e49ba0d1df
Downgrade "failed to load" error to warning
2020-11-27 18:35:22 +01:00
Jonas Schievink
ec7d2bbe42
Add/Fix macro expansion profiling
2020-11-27 18:07:16 +01:00
Kirill Bulatov
7b145bd99c
Rustdocs fixes
2020-11-27 19:05:10 +02:00
Kirill Bulatov
f75f07019b
Group import data in a struct
2020-11-27 18:30:10 +02:00
Kirill Bulatov
f4ae3650d8
Extract the import code into the shared module
2020-11-27 18:28:41 +02:00
Kirill Bulatov
04cd4b17bb
Fix the profiling string
...
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-11-27 18:13:02 +02:00
Kirill Bulatov
b2e6ca46ca
Profile completions better
2020-11-27 18:00:03 +02:00
bors[bot]
c66d477f5a
Merge #6648
...
6648: Avoid allocation in ast::String::value if the string needs no unescaping r=lnicola a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-27 11:14:14 +00:00
Lukas Wirth
347da74eda
Avoid allocation in ast::String::value if the string needs no unescaping
2020-11-27 12:03:58 +01:00
bors[bot]
572081f1c4
Merge #6586
...
6586: Don't call a closure a function in the infer_function_return_type assist label r=lnicola a=Veykril
`Add this function's return type` becomes `Add this closure's return type` for closures. This makes it more obvious that we are indeed planning on modifying the closure and not its containing function.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-27 09:49:37 +00:00
Lukas Wirth
6501c9445e
Don't use raw identifiers
2020-11-26 21:44:17 +01:00
bors[bot]
fc0354b280
Merge #6635
...
6635: Complete struct in irrefutable let r=Veykril a=Veykril
Fixes #6210
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-26 20:30:16 +00:00
Lukas Wirth
ee06c07f50
Complete struct in irrefutable let
2020-11-26 21:28:43 +01:00
Laurențiu Nicola
3aca697511
Simplify error formatting
2020-11-26 21:07:15 +02:00
Laurențiu Nicola
a5477d7f29
Remove unused import
2020-11-26 19:25:59 +02:00
Jonas Schievink
519d870c11
Don't store SyntaxNodePtr
in CrateDefMap
...
It is volatile across reparses and makes incrementality worse.
2020-11-26 17:29:09 +01:00
Jonas Schievink
74cb3e96a5
Test def map invalidation with #[cfg] below change
2020-11-26 17:28:00 +01:00
Jonas Schievink
2c85db8eb6
Implement Display
for macro expansion errors
2020-11-26 16:56:22 +01:00
Jonas Schievink
6a9338e979
Use ExpandResult
instead of MacroResult
...
`MacroResult` is redundant
2020-11-26 16:48:17 +01:00
Jonas Schievink
c784c8ec76
Use named fields in ExpandResult
2020-11-26 16:04:23 +01:00
Jonas Schievink
9ed883f373
Publish diagnostics on file open
...
Diagnostics are sometimes only showing up when typing.
This should fix that.
2020-11-26 13:33:47 +01:00
bors[bot]
db6988d4e7
Merge #6614 #6632
...
6614: Improve autoimports on completion speed r=matklad a=SomeoneToIgnore
Presumably closes https://github.com/rust-analyzer/rust-analyzer/issues/6594
May help https://github.com/rust-analyzer/rust-analyzer/issues/6612
* Ignore modules eaferly
* Do less completion string rendering
6632: Pin cargo_metadata r=matklad a=kjeremy
See: https://github.com/oli-obk/cargo_metadata/pull/142#issuecomment-733653275
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-11-26 10:43:35 +00:00
kjeremy
9a3142664b
Pin cargo_metadata
2020-11-25 10:11:53 -05:00
Kirill Bulatov
9812150047
Document experimental completions
2020-11-25 00:42:58 +02:00
Kirill Bulatov
4c95c6e25d
Gate autoimports begind experimental completions flag
2020-11-25 00:30:28 +02:00
Jonas Schievink
9559bce311
Rename parse_macro
to parse_macro_expansion
...
This does not parse macros, it expands a macro and parses the *result*
2020-11-24 21:57:51 +01:00
Jonas Schievink
f9d0d51101
hir_expand::db: reduce fn visibility
2020-11-24 21:55:08 +01:00
Jonas Schievink
9a3bb19d32
Remove fixed FIXME, propagate errors better
2020-11-24 21:52:19 +01:00
Jonas Schievink
d5e9bf80f9
hir_expand: propagate expansion errors
2020-11-24 19:00:23 +01:00
Lukas Wirth
377fa7db3f
Check structs for match exhaustiveness
2020-11-24 18:50:56 +01:00
Lukas Wirth
4d841dc4e7
Add middle ellipsis missing arm text
2020-11-24 16:46:06 +01:00
Lukas Wirth
a4b5275656
Handle ellipsis in tuple patterns in match exhaustiveness checking
2020-11-24 16:43:28 +01:00
bors[bot]
67d45851bf
Merge #6618
...
6618: Properly infer tuple patterns when encountering ellipsis r=Veykril a=Veykril
We basically just split the subpatterns into two halves when the ellipsis is present and then offset the latter half to account for the ignored bindings.
Fixes #6616
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-24 15:13:25 +00:00
Lukas Wirth
a5efefd3d7
Properly infer tuple struct patterns when encountering ellipsis
2020-11-24 16:11:40 +01:00
kjeremy
e981485b76
New lsp-types to fix versioning
...
Fixes #6603
2020-11-24 08:52:24 -05:00
Lukas Wirth
35dd62e915
Properly infer tuple patterns when encountering ellipsis
2020-11-24 13:56:20 +01:00
Laurențiu Nicola
8af1ed6a09
Avoid string allocations in ignore_test
2020-11-24 12:08:54 +02:00
bors[bot]
6294286fee
Merge #6610
...
6610: add 'Re-enable this test' assist r=SomeoneToIgnore a=jakobhellermann
The `Ignore this test` assist previously allowed ignoring multiple times, each time adding a `#[ignore]` attribute.
This PR instead shows an assist to undo the ignoring.
Co-authored-by: Jakob Hellermann <jakob.hellermann@protonmail.com>
2020-11-24 00:54:53 +00:00
bors[bot]
2ff78cde31
Merge #6613
...
6613: Don't assume DidChangeTextDocument paths exist r=SomeoneToIgnore a=mjibson
Fixes #5933
Co-authored-by: Matt Jibson <matt.jibson@gmail.com>
2020-11-24 00:41:08 +00:00
Kirill Bulatov
4baac238a8
Improve autoimports on completion speed
...
* Ignore modules eaferly
* Do less completion string rendering
2020-11-24 02:28:45 +02:00
Matt Jibson
117c793e80
Don't assume DidChangeTextDocument paths exist
...
Fixes #5933
2020-11-23 16:35:34 -07:00
Jakob Hellermann
a172c2317c
add 'Re-enable this test' assist
2020-11-23 20:31:57 +01:00
Aleksey Kladov
2c083c993f
Minor, import style
2020-11-23 21:19:37 +03:00
David Tolnay
8a11da40a7
Parse unsafe extern block
2020-11-22 20:44:56 -08:00
Lukas Wirth
5d39f6a357
Don't wrap parens around expr in remove_dbg assist if its in conditions
2020-11-20 17:28:56 +01:00
Lukas Wirth
91a1a83601
Fill code_description for rust_analyzer diagnostics
2020-11-18 08:54:52 +01:00