Commit Graph

17306 Commits

Author SHA1 Message Date
Dawer 9899bb450a minor: reenable incremental test builds 2021-05-31 12:15:40 +05:00
bors[bot] f438398124 Merge #9071
9071: minor: reenable incremental release builds r=jonas-schievink a=jonas-schievink

forgot to turn this back on in https://github.com/rust-analyzer/rust-analyzer/pull/9069

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-30 23:52:53 +00:00
Jonas Schievink c9ba634627 reenable incremental release builds 2021-05-31 01:12:11 +02:00
bors[bot] d6490c69fb Merge #9069
9069: minor: Don't force-disable incremental r=jonas-schievink a=jonas-schievink

1.52.1 turns incremental off regardless of this setting, so this is unnecessary. Removing this allow manually overriding Cargo to enable incremental.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-30 21:48:43 +00:00
Jonas Schievink b12d8dcb82 Don't force-disable incremental 2021-05-30 23:46:39 +02:00
bors[bot] 92b9e5ef3c Merge #9068
9068: Move more `CompletinoContext` fields to `ImmediateLocation` r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-30 19:37:29 +00:00
Lukas Wirth 5660408f0a Move more fields to ImmediateLocation 2021-05-30 21:35:01 +02:00
bors[bot] 088b670796 Merge #9065
9065: hir_ty: don't pass where clauses of associated types down to chalk r=cynecx a=cynecx

See #9052.

Co-authored-by: cynecx <me@cynecx.net>
2021-05-30 17:28:52 +00:00
cynecx 51cbcc5346 hir_ty: don't pass where clauses of associated types down to chalk (temp. fix #9052) 2021-05-30 19:21:08 +02:00
bors[bot] f1d163ba51 Merge #9064
9064: Fix incorrect prefer_inner calls on some attribute completions r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-30 15:13:29 +00:00
Lukas Wirth c5cd25d755 Fix incorrect prefer_inner calls on some attribute completions 2021-05-30 17:13:00 +02:00
bors[bot] f41b68637a Merge #9062
9062: internal: Bump deps r=lnicola a=lnicola

Fixes #9061

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-05-30 11:48:59 +00:00
Laurențiu Nicola 36567eb9be Bump deps 2021-05-30 14:48:10 +03:00
bors[bot] 06b301e2f8 Merge #9059
9059: fix: Only complete derive proc macros in `#[derive]` r=jonas-schievink a=jonas-schievink

HIR now gives them `MacroKind::Derive` instead of `MacroKind::ProcMacro`

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-29 19:19:24 +00:00
Jonas Schievink 39533ad7dd Only complete derive proc macros in #[derive] 2021-05-29 21:18:14 +02:00
bors[bot] 505329b9bb Merge #9057
9057: internal: Thread proc-macro types through the HIR r=jonas-schievink a=jonas-schievink

Should help with completion of derives. cc @Veykril 

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-29 18:33:49 +00:00
Jonas Schievink 8c639a87bd Thread proc-macro types through the HIR 2021-05-29 20:32:57 +02:00
bors[bot] f6da603c7f Merge #9050
9050: hir_ty: use async ret type for inference inside async bodies r=flodiebold a=cynecx

Fixes #9004.

Co-authored-by: cynecx <me@cynecx.net>
2021-05-29 17:39:15 +00:00
bors[bot] 0438e2ceaa Merge #9054
9054: fix: fix `matches!` macro on nightly toolchains r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9043

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-29 16:33:20 +00:00
Jonas Schievink 4c4bcaebbe Treat pat_param like pat fragments 2021-05-29 18:32:32 +02:00
bors[bot] 11a1bd3259 Merge #9051
9051: Fix incorrect setting descriptions r=lnicola a=sclu1034

Descriptions for diagnostic warning hint and info display were swapped.

Fixes #8485.

Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-05-29 16:23:59 +00:00
cynecx 54d60fdee9 hir_ty: use async ret type for inference inside async bodies 2021-05-29 18:17:45 +02:00
Lucas Schwiderski 9a057c0ff4 Fix incorrect setting descriptions
Descriptions for diagnostic warning hint and info display were swapped.

Fixes #8485.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-05-29 18:08:14 +02:00
bors[bot] 3fa3343e47 Merge #9048
9048: Add some lint completion tests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-29 15:33:57 +00:00
Lukas Wirth c9598a4cbf Add some lint completion tests 2021-05-29 17:19:49 +02:00
bors[bot] 8cd98bde39 Merge #9046
9046: fix: make `include!` etc. work in expression position r=jonas-schievink a=jonas-schievink

This PR removes determination of fragment kinds from the eager macro implementations. The fragment kind is always determined by the syntax position in which a macro is invoked, not by the macro implementation, even for eager macros.

This makes `include!` work in expression position, and should have the same effect for all macros that may be used in different positions.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-29 15:19:44 +00:00
Jonas Schievink 31588aea04 Remove fragment kind knowledge from builtin macros 2021-05-29 17:17:08 +02:00
bors[bot] 247faf271b Merge #9027
9027: feat: Attribute completion is context aware r=Veykril a=Veykril

This splits off the `lint` and `derive` completions into their own submodules of `attribute`.

The idea is to create a lazy global hashmap that maps `SyntaxKind` to attribute names(`&[&str]`) in which we index with the syntax kind of the "thing" we are attributing giving us the attributes back that are valid for this kind. Then we use this name to do a binary search on the attribute list to fetch and build the corresponding completion item.


Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-29 12:14:16 +00:00
Lukas Wirth c9f0f47bbb simplify 2021-05-29 14:02:06 +02:00
bors[bot] 7869b01b70 Merge #9041
9041: internal: Implement prev sibling determination for `CompletionContext ` r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-28 21:21:37 +00:00
Lukas Wirth e42c448077 More completion pattern tests 2021-05-28 22:19:52 +02:00
Lukas Wirth 47ad752e6c Implement prev sibling determination for CompletionContext 2021-05-28 22:03:31 +02:00
Lukas Wirth a6b92a8cc0 simplify 2021-05-28 20:46:09 +02:00
bors[bot] d5f7b2e52a Merge #9028
9028: only advertise range formatting support if enabled r=Veykril a=euclio

Fixes #9009.

Co-authored-by: Andy Russell <arussell123@gmail.com>
2021-05-28 15:26:20 +00:00
bors[bot] 2968731fd5 Merge #9040
9040: Don't label derive macros with their banged_name r=Veykril a=Veykril

cc https://github.com/rust-analyzer/rust-analyzer/issues/7072#issuecomment-850396203
This doesn't fix it non builtin derives yet I think cause of a FIXME somewhere that doesn't categorize proc-macro derives as derives yet
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-28 12:59:54 +00:00
Lukas Wirth 439ae17e1b Don't label derive macros with their banged_name 2021-05-28 14:59:24 +02:00
bors[bot] b5d41ba0e2 Merge #9038
9038: Folding range for return types r=Veykril a=MozarellaMan

For issue #8957 

![return type fold](https://user-images.githubusercontent.com/48062697/119979082-5c62e100-bfb2-11eb-9729-1dea1ce74de1.gif)


Co-authored-by: Ayomide Bamidele <48062697+MozarellaMan@users.noreply.github.com>
2021-05-28 12:16:18 +00:00
Ayomide Bamidele b4e936f8f0 Test for correct amount of emitted folds 2021-05-28 13:10:41 +01:00
Ayomide Bamidele 156d995423 Folding range for return types 2021-05-28 12:39:02 +01:00
bors[bot] 613649e631 Merge #9037
9037: minor: Move runnable lenses below attributes r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-28 11:03:18 +00:00
Lukas Wirth 61b4456752 Move runnable lenses below attributes 2021-05-28 13:02:42 +02:00
bors[bot] 80fdb13c47 Merge #9036
9036: Remove undocumented `TextDocumentSyncKind::Full` support r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-05-28 10:36:13 +00:00
Laurențiu Nicola 2dee5930e0 Remove undocumented TextDocumentSyncKind::Full support 2021-05-28 13:01:04 +03:00
bors[bot] bca00ac340 Merge #9033
9033: Complete keywords in (Assoc)ItemList with leading attribute r=Veykril a=Veykril

Fixes #7673
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-28 01:21:45 +00:00
Lukas Wirth 1894db49b1 Complete keywords in (Assoc)ItemList with leading attribute 2021-05-28 03:20:55 +02:00
bors[bot] 3a1598c3bc Merge #9032
9032: Only complete modules in empty use-statements r=Veykril a=Veykril

bors r+
Part of #8518

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-28 00:43:16 +00:00
Lukas Wirth 9e71dd9799 Only complete modules in empty use-statements 2021-05-28 02:42:47 +02:00
Lukas Wirth 411eee7614 Add another attribute completion test 2021-05-28 01:09:22 +02:00
Lukas Wirth 0724bd0f21 Add attribute completion tests 2021-05-28 01:02:41 +02:00
bors[bot] 5b4589f474 Merge #9029
9029: minor: test that `ItemTree` makes `hir_def` queries syntax-independent r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-27 22:47:04 +00:00