Commit Graph

11966 Commits

Author SHA1 Message Date
rdambrosio
23e3354ae0 Remove extra whitespace 2021-06-18 02:14:00 -04:00
rdambrosio
8e08b86304 Feat: inline generics in const and func trait completions 2021-06-17 19:54:28 -04:00
bors[bot]
0d863ccea9
Merge #9313
9313: fix: Don't complete keywords in attributes inside expressions r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-17 22:30:30 +00:00
Aleksey Kladov
66673eae2b internal: retire famous_defs_fixture
This is now done declaratively via `minicore`.
2021-06-18 00:42:32 +03:00
Aleksey Kladov
89c2dff58a minor: simplify 2021-06-18 00:36:25 +03:00
Aleksey Kladov
ebb591a570 internal: add derive and ord support to minicore 2021-06-18 00:30:22 +03:00
Lukas Wirth
c1bf1f88ad Complete repr attribute parameters 2021-06-17 21:15:49 +02:00
Aleksey Kladov
ca99aaa053 internal: add From to minicore 2021-06-17 21:04:12 +03:00
Aleksey Kladov
82c7afc703 minor: dead code 2021-06-17 20:51:34 +03:00
Aleksey Kladov
08c220ab2c internal: add default to minicore 2021-06-17 20:49:49 +03:00
bors[bot]
ce926aebc4
Merge #9315
9315: Nest all the or-patterns! r=Veykril a=Veykril

`cargo +nightly clippy --fix -Z unstable-options --allow-dirty -- -A clippy::all -D clippy::unnested_or_patterns`

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-17 16:22:32 +00:00
Lukas Wirth
02d25ab60d Fix parser tests for 1.53 2021-06-17 18:09:44 +02:00
Lukas Wirth
b6cb6d5abe simplify 2021-06-17 17:58:26 +02:00
Lukas Wirth
95c8c65139 Nest all the or-patterns! 2021-06-17 17:37:14 +02:00
Lukas Wirth
2ac03ef1d6 Don't complete keywords in attributes inside expressions 2021-06-17 16:02:51 +02:00
Lukas Wirth
2a48b53220 Correct completions in items tests 2021-06-17 15:43:21 +02:00
Lukas Wirth
a9a77671f2 Move item specific completion tests 2021-06-17 15:32:34 +02:00
Lukas Wirth
9df848c580 Less filtering in completion tests 2021-06-17 15:10:25 +02:00
bors[bot]
c82a9141ab
Merge #9310
9310: internal: Refine and test UseTree completions r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-17 12:01:43 +00:00
Lukas Wirth
9353f36516 Fix incorrect completions in empty braced use statement 2021-06-17 13:59:31 +02:00
Lukas Wirth
2225db2eb4 Refine self, super and crate completion in use paths 2021-06-17 13:56:55 +02:00
Lukas Wirth
e14f5cfff0 Move out and rewrite UseTree completion tests 2021-06-17 13:13:12 +02:00
bors[bot]
3b58d8f785
Merge #9308
9308: fix: Create modules in correct directory for nested modules in move_module assist r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-17 10:10:25 +00:00
Lukas Wirth
cd5f4121e3 Create modules in correct directory for nested modules in move_module assist 2021-06-17 12:09:28 +02:00
Aleksey Kladov
ac35645455 internal: remove dead code 2021-06-17 11:42:43 +03:00
Aleksey Kladov
a43bba760e internal: switch some tests to minicore 2021-06-17 11:41:36 +03:00
Aleksey Kladov
c42cdff3d2 internal: minimize minicore
We want to keep minicore small, so let's split out iterator adapters and
sources into a separate `iterators` region, and use them only when
needed.
2021-06-17 11:28:44 +03:00
Aleksey Kladov
9b3aa591cd internal: switch some tests to minicore 2021-06-17 11:18:37 +03:00
bors[bot]
7b4f5c0262
Merge #9304
9304: internal: cleanup tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-16 20:28:23 +00:00
Aleksey Kladov
35772256f8 internal: cleanup tests 2021-06-16 23:27:46 +03:00
Aleksey Kladov
ee7b649d44 internal: switch some tests to minicore 2021-06-16 22:54:57 +03:00
Lukas Wirth
aa644b5585 Move test_utils into tests module 2021-06-16 21:51:52 +02:00
Lukas Wirth
11115ebad8 Don't complete paths after attributes 2021-06-16 21:51:21 +02:00
Lukas Wirth
9ea6ee6b27 Don't show incorrect completions after unsafe or visiblity node 2021-06-16 21:51:20 +02:00
Lukas Wirth
1a8f76a224 Don't complete visibility accessors after existing ones 2021-06-16 21:51:20 +02:00
Lukas Wirth
d338a80394 Start refactoring ide_completion tests 2021-06-16 21:51:20 +02:00
Aleksey Kladov
604267088c internal: add iterator to minicore 2021-06-16 22:48:48 +03:00
Aleksey Kladov
7ba5482a04 internal: switch some tests to minicore 2021-06-16 22:26:46 +03:00
Aleksey Kladov
7e0d441687 internal: switch some tests to minicore 2021-06-16 22:24:11 +03:00
bors[bot]
f38770cd26
Merge #9302
9302: internal: Add builtin derives to attribute completion fixtures r=Veykril a=Veykril

bors R+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-16 17:28:13 +00:00
Lukas Wirth
a92ed1eef4 Don't complete already used derive attributes 2021-06-16 19:27:06 +02:00
Lukas Wirth
8f936c5571 Add builtin derives to attribute completion fixtures 2021-06-16 19:25:09 +02:00
bors[bot]
f6e73d510d
Merge #9258
9258: minor: Give `ImportPrefix` variants better config names r=matklad a=Veykril

I feel like `crate` and `self` work better than `by_crate` and `by_self`. The only reason for the current names were that `Self` doesn't work for the variant name on the rust side so I forgot about setting proper config names on serde layer.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-16 14:53:06 +00:00
Lukas Wirth
66b701ed3e Simplify 2021-06-16 15:51:01 +02:00
bors[bot]
1c034c084d
Merge #9299
9299: minor: Filter out non-type completions in the respective completions modules instead r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-16 13:10:44 +00:00
Lukas Wirth
354ad29493 Filter out non-type completions in the respective completions modules instead 2021-06-16 15:08:44 +02:00
Aleksey Kladov
8a4d9bb80a internal: add fn to minicore 2021-06-16 12:15:45 +03:00
Aleksey Kladov
d2c9f3add1 internal: add deref_mut to minicore 2021-06-16 10:30:29 +03:00
bors[bot]
5ba5e6348f
Merge #9293
9293: fix: Show diagnostic fixes before assists r=matklad a=lnicola

Closes #9212

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-06-15 20:38:29 +00:00
bors[bot]
9bddd2af55
Merge #9294
9294: internal: introduce minicore -- a subset of libcore for testing r=matklad a=matklad

Clearly, we need one more fixed point iteration loop!

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-15 20:14:36 +00:00
Aleksey Kladov
7cbcbccc78 internal: switch some tests to minicore 2021-06-15 23:11:53 +03:00
Aleksey Kladov
0798cce9e5 internal: add result to minicore 2021-06-15 23:07:25 +03:00
Aleksey Kladov
ae92057df6 internal: switch some tests to minicore 2021-06-15 23:02:38 +03:00
Aleksey Kladov
2870d2bade internal: add option to minicore 2021-06-15 22:59:51 +03:00
Lukas Wirth
29054e02fb Highlight unsafe trait refs as unsafe only in impl blocks and definitions 2021-06-15 21:49:59 +02:00
Aleksey Kladov
3efe5c3426 internal: add future to minicore 2021-06-15 22:49:00 +03:00
Aleksey Kladov
2eef66a2ed internal: sanity-check minicore flags 2021-06-15 22:38:21 +03:00
Aleksey Kladov
09c4013ec0 internal: switch some tests to minicore 2021-06-15 22:02:29 +03:00
Aleksey Kladov
ee13e895e3 internal: switch some tests to minicore 2021-06-15 21:57:56 +03:00
Aleksey Kladov
0bb1f1bc90 internal: add ranges to minicore 2021-06-15 21:45:25 +03:00
Aleksey Kladov
f4b52682da internal: unindent some tests 2021-06-15 21:39:44 +03:00
Aleksey Kladov
b737b894cb internal: switch some tests to minicore 2021-06-15 21:36:50 +03:00
Aleksey Kladov
7ebac5e54c internal: switch some tests to minicore 2021-06-15 21:34:26 +03:00
Aleksey Kladov
0475201538 internal: switch some tests to minicore 2021-06-15 21:19:51 +03:00
Aleksey Kladov
f841369fee internal: switch some tests to minicore 2021-06-15 21:11:53 +03:00
Aleksey Kladov
f521e41853 internal: introduce minicore -- a subset of libcore for testing 2021-06-15 21:03:08 +03:00
Laurențiu Nicola
e58f63dc63 Show diagnostic fixes before assists 2021-06-15 20:55:27 +03:00
Aleksey Kladov
067e97d149 internal: enforce no #[ignore] and no #[should_panic] 2021-06-15 16:54:43 +03:00
Aleksey Kladov
4584868a7a internal: don't #[ignore] tests
See the style.md for motivation
2021-06-15 16:37:58 +03:00
Aleksey Kladov
1e100e8b3e internal: cleanup tests
* ensure standard, non-indented style (should add this check to
  `fixture` some day)
* removed a couple of ignores
2021-06-15 12:48:05 +03:00
Aleksey Kladov
7786ab2d44 minor: add a test variation 2021-06-15 11:58:39 +03:00
bors[bot]
fa4c851619
Merge #9278
9278: internal: document that we don't #[ignore] tests r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-15 08:48:15 +00:00
Aleksey Kladov
3f4ad44082 internal: document that we don't #[ignore] tests 2021-06-15 11:46:47 +03:00
Laurențiu Nicola
41949748a6 Use objects instead of bools for markers in package.json 2021-06-15 09:40:43 +03:00
bors[bot]
447d849c9e
Merge #9277
9277: internal: more natural order of sources for TypeParam r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-14 19:44:59 +00:00
Aleksey Kladov
c2015e7d18 internal: more natural order of sources for TypeParam
We usually use first (left) variant of `Either` for "usual" case, and
use right for odd things. For example, pat source is Pat | SelfParam.
2021-06-14 22:42:43 +03:00
bors[bot]
ce8fdf3ab0
Merge #9276
9276: internal: refactor diagnostics more r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-14 19:37:28 +00:00
Aleksey Kladov
4cfc767d7f internal: test diagnostic severeties and presense of fixes 2021-06-14 22:37:06 +03:00
Aleksey Kladov
58712088ac minor: make diagnostics more similar 2021-06-14 22:37:06 +03:00
bors[bot]
27a70492f7
Merge #9275
9275: feat: Support goto type for field expressions and patterns r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-14 19:08:05 +00:00
Lukas Wirth
2c8e89b6f0 Support goto type for field expressions and patterns 2021-06-14 21:07:07 +02:00
Aleksey Kladov
06f5d6f640 internal: don't pull tracing via chalk 2021-06-14 20:41:08 +03:00
bors[bot]
38ae18b759
Merge #9272
9272: internal: move diagnostics to a dedicated crate r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-14 16:46:25 +00:00
Aleksey Kladov
4768e5fb23 internal: document diagnostics crate 2021-06-14 19:45:39 +03:00
bors[bot]
401d79ac06
Merge #9270
9270: minor: Add assoc type in trait bound completion test r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-14 16:17:55 +00:00
Lukas Wirth
5558e11282 Add assoc type in trait bound completion test 2021-06-14 18:17:21 +02:00
Aleksey Kladov
94f7b63522 minor: less ambiguous name 2021-06-14 19:16:03 +03:00
Aleksey Kladov
da534bdd07 internal: flatten module hierarchy
It seems that any crate can be made better by flattening the modules
down to a single layer?
2021-06-14 19:14:34 +03:00
Aleksey Kladov
9fb67e7477 internal: document rename challenges 2021-06-14 19:08:12 +03:00
Lukas Wirth
c7c2eb8b08 typo 2021-06-14 18:01:38 +02:00
Aleksey Kladov
26c978f258 internal: adapt diagnostics to the new rename API 2021-06-14 18:46:54 +03:00
Aleksey Kladov
a91071b57b internal: cut deps between assists and diagnostics 2021-06-14 17:45:17 +03:00
Aleksey Kladov
2e8dab631b internal: prepare to move assist definitions 2021-06-14 17:45:17 +03:00
Aleksey Kladov
1d2772c2c7 internal: move diagnostics to a new crate 2021-06-14 17:45:17 +03:00
Aleksey Kladov
3d2f0400a2 internal: start ide diagnostics crate 2021-06-14 17:45:17 +03:00
Aleksey Kladov
721feb1832 internal: prepare to move rename to base_db
It's better to handle magical cases upper in the stack, because it
allows for better re-use of the general implementation below. So, we
pull the `self` case up here.

The end goal is to put `Definition::rename` to the `ide_db`, because
it's a generally re-usable functionality useful for different ide
features, alongside with the search which is already there.
2021-06-14 17:28:39 +03:00
Lukas Wirth
178b5ffba3 Add configuration deprecation 2021-06-14 15:49:57 +02:00
Lukas Wirth
9043c5db86 Don't ignore hover documentation setting for keyword hovers 2021-06-14 15:31:14 +02:00
Lukas Wirth
a93d166f0f Make documentation on hover configurable 2021-06-14 15:25:10 +02:00
bors[bot]
d4ab49c533
Merge #9263
9263: fix: don't use display-related functionality where semantics matters r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-14 12:46:38 +00:00