Commit graph

338 commits

Author SHA1 Message Date
Kirill Bulatov
740a26b7d2 Rename add import assist 2020-02-07 23:53:08 +02:00
Aleksey Kladov
d00add1f1f Introduce assists utils 2020-02-07 17:28:02 +01:00
Aleksey Kladov
561b4b11ff Name assist handlers 2020-02-07 17:28:02 +01:00
Aleksey Kladov
aa64a84b49 Cleanups 2020-02-07 15:12:51 +01:00
Aleksey Kladov
ce44547cfb Cleanup imports 2020-02-07 15:10:19 +01:00
Aleksey Kladov
6ac9c4ad6a Cleanup 2020-02-07 15:04:50 +01:00
Aleksey Kladov
2d95047f7c Cleanup 2020-02-07 14:55:47 +01:00
Aleksey Kladov
b831b17b3d Simplify 2020-02-07 14:53:50 +01:00
Aleksey Kladov
36ee9ecb67 Cleanup early return assist 2020-02-07 12:30:39 +01:00
Aleksey Kladov
aa1234e02b Generalize invert_if to just always work 2020-02-07 12:14:33 +01:00
Aleksey Kladov
56e3fbe588 A tiny bit more consistent API 2020-02-06 23:59:27 +01:00
Aleksey Kladov
7e73b7a5f8 Minor rename 2020-02-06 18:47:26 +01:00
Kirill Bulatov
f4a4fcf275 Remove the leftovers after ImportLocator removal 2020-02-06 19:27:48 +02:00
Aleksey Kladov
755077e372 Doctest autoimport 2020-02-06 18:14:44 +01:00
Aleksey Kladov
d1e8b8d134 Fix tests 2020-02-06 17:42:17 +01:00
Aleksey Kladov
ad204f7562 Mostly remove ImoportLocator infra 2020-02-06 17:17:51 +01:00
Aleksey Kladov
cf812c12d1 Assists are not generic 2020-02-06 17:12:02 +01:00
Aleksey Kladov
f8965ffafd Remove assists TestDB 2020-02-06 16:56:42 +01:00
Aleksey Kladov
2c922ef549 Start switching assists to a root database 2020-02-06 16:56:42 +01:00
Aleksey Kladov
a173e31890 Make assists use ImportsLocator directly 2020-02-06 16:40:28 +01:00
Aleksey Kladov
ec6fb8da7c Add profiling around add_impl_members
This intention is pretty slow for `impl Interator`, because it has a
ton of default methods which need to be substituted.

The proper fix here is to not compute the actual edit until the user
triggers the action, but that's awkward to do in the LSP right now, so
let's just put a profiling code for now.
2020-02-06 14:55:10 +01:00
Aleksey Kladov
a4c6e8c4e2 Refactor if-let -> match assist to use ast::make 2020-02-05 14:08:16 +01:00
Aleksey Kladov
f756d5da06 Better cursor placement when merging arms 2020-02-05 13:41:43 +01:00
Aleksey Kladov
28acd01c63 Merge match arms works with many arms 2020-02-05 12:26:43 +01:00
Aleksey Kladov
45dd90b0e8 Cleanup 2020-02-05 11:46:05 +01:00
bors[bot]
c9e1aab880
Merge #2948
2948: Allow add_explicit_type to replace a placeholder type r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-02-04 16:12:05 +00:00
Kirill Bulatov
bfbc5e2d37 Use proper import name in the label 2020-02-03 15:44:28 +02:00
Kirill Bulatov
4f27155d5c Simplify paths searches 2020-02-03 13:56:03 +02:00
Laurențiu Nicola
e0c7ce8417 Allow add_explicit_type to replace a placeholder type 2020-02-03 13:09:38 +02:00
Kirill Bulatov
01d59f4a32 Use name only when searching for an import candidate 2020-02-02 23:27:20 +02:00
bors[bot]
e24829909a
Merge #2982
2982: Merge imports when auto importing r=flodiebold a=SomeoneToIgnore



Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-02-02 13:06:14 +00:00
Kirill Bulatov
2ee94e3e24
Remove obsolete rustdoc 2020-02-02 14:59:07 +02:00
Kirill Bulatov
6dae5cbb11 Require ModPath for importing 2020-02-02 14:06:51 +02:00
Kirill Bulatov
a9669a5505 Merge imports when auto importing 2020-02-02 10:28:16 +02:00
Kirill Bulatov
d3188769e4 Auto import functions 2020-02-01 22:13:02 +02:00
Laurențiu Nicola
0fdca457df Improve auto import message 2020-01-31 22:12:18 +02:00
Kirill Bulatov
6d219c9a10 Properly select a target for auto importing 2020-01-29 16:23:18 +02:00
Kirill Bulatov
9be1ab7ff9 Code review fixes 2020-01-27 14:42:45 +02:00
Kirill Bulatov
9a6b5c6183 Enforce alphabetical import sorting 2020-01-27 01:53:59 +02:00
Kirill Bulatov
1a78991df6 Adjust the tests 2020-01-27 00:57:24 +02:00
Kirill Bulatov
d0a782ef1c Have a better trait interface 2020-01-27 00:17:10 +02:00
Kirill Bulatov
f57239729c Remove unnecessary lifetime parameter 2020-01-27 00:16:29 +02:00
Kirill Bulatov
316795e074 Initial auto import action implementation 2020-01-27 00:16:29 +02:00
Tomáš
ec6a7f0710 fixed inline_local_variable bug 2020-01-25 21:07:21 +01:00
TomasKralCZ
f67ee69777 added eq_token() method to LetStmt 2020-01-19 18:55:56 +01:00
TomasKralCZ
c3b9a19eb7 fix 'add_explicit_type' assist range 2020-01-19 17:40:53 +01:00
TomasKralCZ
8dc94a452c fix typo in 'inline_local_variable' 2020-01-19 17:39:53 +01:00
Aleksey Kladov
a3d6ddbe69 More natural trait setup 2020-01-16 16:27:21 +01:00
Aleksey Kladov
81a45ca1b3 Make FromSource private 2020-01-16 16:08:46 +01:00
Kirill Bulatov
79b77403b6 Reduce visibility 2020-01-15 20:21:05 +02:00