Commit Graph

218 Commits

Author SHA1 Message Date
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
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
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
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
d2c9f3add1 internal: add deref_mut to minicore 2021-06-16 10:30:29 +03:00
Aleksey Kladov
7cbcbccc78 internal: switch some tests to minicore 2021-06-15 23:11:53 +03:00
Aleksey Kladov
ae92057df6 internal: switch some tests to minicore 2021-06-15 23:02:38 +03:00
Aleksey Kladov
4584868a7a internal: don't #[ignore] tests
See the style.md for motivation
2021-06-15 16:37:58 +03:00
Lukas Wirth
5558e11282 Add assoc type in trait bound completion test 2021-06-14 18:17:21 +02:00
bors[bot]
5a8ddb4b2d
Merge #9260
9260: tree-wide: make rustdoc links spiky so they are clickable r=matklad a=lf-

Rustdoc was complaining about these while I was running with --document-private-items and I figure they should be fixed.

Co-authored-by: Jade <software@lfcode.ca>
2021-06-14 07:16:48 +00:00
Jade
20b325c7d5 tree-wide: make rustdoc links spiky so they are clickable 2021-06-13 21:58:05 -07:00
Aleksey Kladov
546be18e3a internal: check that coverage marks are always paired 2021-06-13 13:13:26 +03:00
Maan2003
aabd41cafc
clippy::redundant_field_names 2021-06-13 09:40:22 +05:30
Maan2003
75370312fb
clippy::redundant_closure 2021-06-13 09:29:36 +05:30
Maan2003
c9b4ac5be4
clippy::redudant_borrow 2021-06-13 09:24:16 +05:30
Kirill Bulatov
9c0b141dc9 Fix some typos in flyimport docs 2021-06-12 21:51:09 +03:00
Lukas Wirth
ec9ef9c283 Complete associated types in dyn and impl trait 2021-06-11 23:12:30 +02:00
bors[bot]
863e23f00f
Merge #9219
9219: minor: Replace some AssocItem::containing_trait calls trait_or_trait_impl r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-11 17:56:00 +00:00
Lukas Wirth
db4a1fcab4 Replace some AssocItem::containing_trait calls trait_or_trait_impl 2021-06-11 19:55:24 +02:00
Lukas Wirth
4e588dfd88 Don't allow lookup by self for unprefixed self access completions 2021-06-11 18:26:52 +02:00
bors[bot]
c6133fe51c
Merge #9195
9195: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-09 21:45:35 +00:00
Lukas Wirth
20d26bd109 Simplify 2021-06-09 23:45:12 +02:00
Lukas Wirth
ae8d74ab2c Implement dummy expansions for builtin attributes 2021-06-09 18:27:08 +02:00
bors[bot]
b6199de706
Merge #9181 #9182
9181: Don't complete values in type position r=jonas-schievink a=Veykril

Will add some proper tests in a bit

9182: fix: don't complete derive macros as fn-like macros r=jonas-schievink a=jonas-schievink

Part of https://github.com/rust-analyzer/rust-analyzer/issues/8518

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-08 19:09:13 +00:00
Lukas Wirth
1a26af15ef Add tests checking no value completion in type pos 2021-06-08 20:27:25 +02:00
Jonas Schievink
ee374ff1ee fix: don't complete derive macros as fn-like macros 2021-06-08 17:31:47 +02:00
Lukas Wirth
1d74ef1d98 Don't complete values in type position 2021-06-08 16:50:10 +02:00
Lukas Wirth
2987e05f15 simplify 2021-06-07 20:45:17 +02:00
Lukas Wirth
b29e8ed994 Remove unnecessary completion::macro_in_item_position 2021-06-07 19:46:25 +02:00
Lukas Wirth
aa29364f83 Reorder CompletionContext fields 2021-06-07 19:06:03 +02:00
Lukas Wirth
4eabcb2c01 Move more things into PathCompletionContext 2021-06-07 14:08:05 +02:00
Lukas Wirth
e475bcdcc6 Simplify CompletionContext by introducing a path CallKind enum 2021-06-06 20:02:26 +02:00
bors[bot]
ad9234fef2
Merge #9140
9140: feat: Render documentation for derive completion r=Veykril a=Veykril

![eEzGiq2wNa](https://user-images.githubusercontent.com/3757771/120847308-9c5a3300-c573-11eb-958d-e0f22f4757ed.gif)

Nothing fancy as all the std derives aren't really documented though maybe some 3rd party crates document them equally to their trait counterparts.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-05 17:23:40 +00:00
Lukas Wirth
abc941d2c8 Fix incorrect list nesting in format_like feature description 2021-06-05 12:43:45 +02:00
Lukas Wirth
544eca10d6 Complete third-party attributes 2021-06-04 21:07:19 +02:00
Lukas Wirth
7524850831 Render documentation for derive completion 2021-06-04 20:58:12 +02:00
Lukas Wirth
343df88ac7 Generate default lint completions 2021-06-04 18:35:19 +02:00
Lukas Wirth
5d17b6a687 Implement hover for lints 2021-06-04 17:03:18 +02:00
Matthias Krüger
9452dfaac7 NFC: remove redundant clones (clippy::perf) 2021-06-03 15:32:46 +02:00
Lukas Wirth
76fd1b316f Remove obsolete is_new_item field on CompletionContext 2021-06-02 17:12:36 +02:00