]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #9716
bors[bot] [Wed, 28 Jul 2021 15:39:57 +0000 (15:39 +0000)]
Merge #9716

9716: internal: Stop reexporting `hir_def`'s `ItemInNs` from HIR r=jonas-schievink a=jonas-schievink

Resolves a FIXME and simplifies downstream code

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoStop reexporting `hir_def`'s `ItemInNs` from HIR
Jonas Schievink [Wed, 28 Jul 2021 15:39:04 +0000 (17:39 +0200)]
Stop reexporting `hir_def`'s `ItemInNs` from HIR

3 years agoMerge #9715
bors[bot] [Wed, 28 Jul 2021 14:00:33 +0000 (14:00 +0000)]
Merge #9715

9715: feat: Make most completions respect `#[doc(hidden)]` r=jonas-schievink a=jonas-schievink

Closes https://github.com/rust-analyzer/rust-analyzer/issues/2003

This continues https://github.com/rust-analyzer/rust-analyzer/pull/9681 and makes most other completion sources respect `#[doc(hidden)]`. After this, only flyimport is missing support for this.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMake most completions respect `#[doc(hidden)]`
Jonas Schievink [Wed, 28 Jul 2021 13:59:02 +0000 (15:59 +0200)]
Make most completions respect `#[doc(hidden)]`

3 years agoMerge #9700
bors[bot] [Wed, 28 Jul 2021 12:07:25 +0000 (12:07 +0000)]
Merge #9700

9700: fix: Remove the legacy macro scoping hack r=matklad a=jonas-schievink

This stops prepending `self::` to single-ident macro paths, resolving even legacy-scoped macros using the fixed-point algorithm. This is not correct, but a lot easier than fixing this properly (which involves pushing a new scope for every macro definition and invocation).

This allows resolution of macros from the prelude, fixing https://github.com/rust-analyzer/rust-analyzer/issues/9687.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #9693
bors[bot] [Wed, 28 Jul 2021 11:21:33 +0000 (11:21 +0000)]
Merge #9693

9693: feat: Add the Hover Range capability which enables showing the type of an expression r=matklad a=alexfertel

Closes https://github.com/rust-analyzer/rust-analyzer/issues/389

This PR extends the `textDocument/hover` method to allow getting the type of an expression. It looks like this:

![type_of_expression](https://user-images.githubusercontent.com/22298999/126914293-0ce49a92-545d-4005-a59e-9294fa2330d6.gif)

Edit: One thing I noticed is that when hovering a selection that includes a macro it doesn't work, so maybe this would need a follow-up issue discussing what problem that may have.

(PS: What a great project! I am learning a lot! 🚀)

Co-authored-by: Alexander Gonzalez <alexfertel97@gmail.com>
Co-authored-by: Alexander González <alexfertel97@gmail.com>
3 years agofix: Revert removing [] from the hover gif
Alexander González [Wed, 28 Jul 2021 10:58:19 +0000 (06:58 -0400)]
fix: Revert removing [] from the hover gif

3 years agoMerge #9712
bors[bot] [Wed, 28 Jul 2021 09:36:01 +0000 (09:36 +0000)]
Merge #9712

9712: minor: simplify r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: simplify
Aleksey Kladov [Wed, 28 Jul 2021 09:25:14 +0000 (12:25 +0300)]
minor: simplify

3 years agorefactor: Reuse the from_proto call in handle_hover
Alexander Gonzalez [Tue, 27 Jul 2021 22:21:47 +0000 (18:21 -0400)]
refactor: Reuse the from_proto call in handle_hover

3 years agofeat: Add the Hover Range server capability
Alexander Gonzalez [Tue, 27 Jul 2021 22:13:22 +0000 (18:13 -0400)]
feat: Add the Hover Range server capability

3 years agofix: Typos
Alexander Gonzalez [Tue, 27 Jul 2021 22:00:22 +0000 (18:00 -0400)]
fix: Typos

3 years agorefactor: Apply PR suggestions
Alexander Gonzalez [Tue, 27 Jul 2021 21:50:26 +0000 (17:50 -0400)]
refactor: Apply PR suggestions

3 years agochore: Remove unnecessary println! call
Alexander Gonzalez [Mon, 26 Jul 2021 21:42:36 +0000 (17:42 -0400)]
chore: Remove unnecessary println! call

3 years agolint: Format the typescript files properly
Alexander Gonzalez [Mon, 26 Jul 2021 21:33:21 +0000 (17:33 -0400)]
lint: Format the typescript files properly

3 years agotest: Update lsp_ext.rs hash
Alexander Gonzalez [Mon, 26 Jul 2021 21:07:04 +0000 (17:07 -0400)]
test: Update lsp_ext.rs hash

3 years agodocs: Update the lsp-extensions.md with the Hover Range capability
Alexander Gonzalez [Mon, 26 Jul 2021 21:05:59 +0000 (17:05 -0400)]
docs: Update the lsp-extensions.md with the Hover Range capability

3 years agotest: Add tests for when hovering fails
Alexander Gonzalez [Mon, 26 Jul 2021 20:19:12 +0000 (16:19 -0400)]
test: Add tests for when hovering fails

3 years agodocs: Improve the comments in crates/ide/src/hover.rs
Alexander Gonzalez [Mon, 26 Jul 2021 19:55:09 +0000 (15:55 -0400)]
docs: Improve the comments in crates/ide/src/hover.rs

3 years agotest: Add hover_range tests
Alexander Gonzalez [Mon, 26 Jul 2021 19:34:44 +0000 (15:34 -0400)]
test: Add hover_range tests

3 years agorefactor: Make handle_hover handle ranges too
Alexander Gonzalez [Mon, 26 Jul 2021 16:14:14 +0000 (12:14 -0400)]
refactor: Make handle_hover handle ranges too

3 years agofix: Unregister the removed command
Alexander Gonzalez [Sun, 25 Jul 2021 21:54:06 +0000 (17:54 -0400)]
fix: Unregister the removed command

3 years agorefactor: Remove unnecessary command
Alexander Gonzalez [Sun, 25 Jul 2021 21:50:16 +0000 (17:50 -0400)]
refactor: Remove unnecessary command

3 years agochore: Remove unnecessary log
Alexander Gonzalez [Sun, 25 Jul 2021 21:28:25 +0000 (17:28 -0400)]
chore: Remove unnecessary log

3 years agofeat: Completed the client side implementation of rust-analyzer/hoverRange
Alexander Gonzalez [Sun, 25 Jul 2021 21:26:54 +0000 (17:26 -0400)]
feat: Completed the client side implementation of rust-analyzer/hoverRange

3 years agofeat: Add the hover_range capability
Alexander Gonzalez [Sun, 25 Jul 2021 01:54:48 +0000 (21:54 -0400)]
feat: Add the hover_range capability

3 years agofeat: Extend the server with the hover_range capability
Alexander Gonzalez [Fri, 23 Jul 2021 02:08:28 +0000 (22:08 -0400)]
feat: Extend the server with the hover_range capability

3 years agoMerge #9710
bors[bot] [Tue, 27 Jul 2021 17:30:37 +0000 (17:30 +0000)]
Merge #9710

9710: fix: Don't qualify self as crate in add_missing_impl_members assist r=Veykril a=Veykril

Fixes #7499

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't qualify self as crate in add_missing_impl_members assist
Lukas Wirth [Tue, 27 Jul 2021 17:29:47 +0000 (19:29 +0200)]
Don't qualify self as crate in add_missing_impl_members assist

3 years agoMerge #9709
bors[bot] [Tue, 27 Jul 2021 16:41:02 +0000 (16:41 +0000)]
Merge #9709

9709: fix: add capability for "open cargo.toml" lsp extension r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofix: add capability for "open cargo.toml" lsp extension
Aleksey Kladov [Tue, 27 Jul 2021 16:40:19 +0000 (19:40 +0300)]
fix: add capability for "open cargo.toml" lsp extension

3 years agoMerge #9703
bors[bot] [Mon, 26 Jul 2021 22:23:35 +0000 (22:23 +0000)]
Merge #9703

9703: docs: Fix several typos and grammar mistakes r=matklad a=alexfertel

I took some time to clean up the dev docs a bit since I spent the whole week reading them. I am not a native speaker, so if you find something wrong please tell me and I'll fix it 😁

Co-authored-by: Alexander Gonzalez <alexfertel97@gmail.com>
3 years agodocs: Fix several typos and grammar mistakes
Alexander Gonzalez [Mon, 26 Jul 2021 22:15:40 +0000 (18:15 -0400)]
docs: Fix several typos and grammar mistakes

3 years agoMerge #9702
bors[bot] [Mon, 26 Jul 2021 18:28:32 +0000 (18:28 +0000)]
Merge #9702

9702: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSimplify
Lukas Wirth [Mon, 26 Jul 2021 11:30:41 +0000 (13:30 +0200)]
Simplify

3 years agoMerge #9701
bors[bot] [Mon, 26 Jul 2021 18:22:29 +0000 (18:22 +0000)]
Merge #9701

9701: fix: correctly update diagnostics when files are opened and closed r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofix: correctly update diagnostics when files are opened and closed
Aleksey Kladov [Mon, 26 Jul 2021 18:18:22 +0000 (21:18 +0300)]
fix: correctly update diagnostics when files are opened and closed

Basically, this tracks the changes to `subscriptions` we use when
issuing a publish_diagnostics.

3 years agoRemove the legacy macro scoping hack
Jonas Schievink [Mon, 26 Jul 2021 17:58:14 +0000 (19:58 +0200)]
Remove the legacy macro scoping hack

3 years agointernal: prepare to track changes to mem_docs
Aleksey Kladov [Mon, 26 Jul 2021 17:16:47 +0000 (20:16 +0300)]
internal: prepare to track changes to mem_docs

3 years agoMerge #9558
bors[bot] [Mon, 26 Jul 2021 14:53:05 +0000 (14:53 +0000)]
Merge #9558

9558: Do not erase Cargo diagnostics from the closed documents r=matklad a=SomeoneToIgnore

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

The LSP specification at https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#textDocument_publishDiagnostics states that

> Diagnostics notification are sent from the server to the client to signal results of validation runs.
>
> Diagnostics are “owned” by the server so it is the server’s responsibility to clear them if necessary. The following rule is used for VS Code servers that generate diagnostics:
>
>  *  if a language is single file only (for example HTML) then diagnostics are cleared by the server when the file is closed.
>  *  if a language has a project system (for example C#) diagnostics are not cleared when a file closes. When a project is opened all diagnostics for all files are recomputed (or read from a cache).
>
> When a file changes it is the server’s responsibility to re-compute diagnostics and push them to the client. If the computed set is empty it has to push the empty array to clear former diagnostics. Newly pushed diagnostics always replace previously pushed diagnostics. There is no merging that happens on the client side.

So for projects we should not clear any diagnostics from cargo/json projects.
Our "standalone file" mode is in a way a project too, with sysroot attached and a potential support for dynamic standalone files.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoMerge #9699
bors[bot] [Mon, 26 Jul 2021 13:23:17 +0000 (13:23 +0000)]
Merge #9699

9699: fix: Fix generic_arg not parsing opt_generic_arg_list properly in arg lists r=Veykril a=Veykril

Fixes #9697
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix generic_arg not parsing opt_generic_arg_list properly in arg lists
Lukas Wirth [Mon, 26 Jul 2021 13:21:19 +0000 (15:21 +0200)]
Fix generic_arg not parsing opt_generic_arg_list properly in arg lists

3 years agoMerge #9593
bors[bot] [Mon, 26 Jul 2021 10:36:31 +0000 (10:36 +0000)]
Merge #9593

9593: fix: Adding remove_unused_param for method and fixing same for assoc func r=matklad a=feniljain

Solves #9571

Co-authored-by: vi_mi <fenil.jain2018@vitstudent.ac.in>
3 years agoMerge #9692
bors[bot] [Mon, 26 Jul 2021 10:29:24 +0000 (10:29 +0000)]
Merge #9692

9692: Use same cancelled spelling in doc and code. r=matklad a=mattiasgronlund

Right thing might be to update the spelling in the code to
follow American instead of English spelling, that is
using only canceled. But they should at least be aligned.

Co-authored-by: Mattias Grönlund <mattias@gronlund.se>
3 years agoMerge #9696
bors[bot] [Mon, 26 Jul 2021 08:43:58 +0000 (08:43 +0000)]
Merge #9696

9696: Fix some grammar / spelling mistakes r=lnicola a=jplatte

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
3 years agoFix some grammar / spelling mistakes
Jonas Platte [Mon, 26 Jul 2021 08:12:41 +0000 (10:12 +0200)]
Fix some grammar / spelling mistakes

3 years agoUse same cancelled spelling in doc and code.
Mattias Grönlund [Sun, 25 Jul 2021 21:12:28 +0000 (23:12 +0200)]
Use same cancelled spelling in doc and code.

Right thing might be to update the spelling in the code to
follow American instead of English spelling, that is
using only canceled. But they should at least be aligned.

3 years agoMerge #9691
bors[bot] [Sun, 25 Jul 2021 13:52:35 +0000 (13:52 +0000)]
Merge #9691

9691: fix: Keep catch-all arm in fill_match_arms if it has a non-empty expression r=Veykril a=Veykril

Fixes #4165
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoKepp catch-all arm in fill_match_arms if it has a non-empty expression
Lukas Wirth [Sun, 25 Jul 2021 13:50:40 +0000 (15:50 +0200)]
Kepp catch-all arm in fill_match_arms if it has a non-empty expression

3 years agoMerge #9688
bors[bot] [Sat, 24 Jul 2021 18:37:13 +0000 (18:37 +0000)]
Merge #9688

9688: feat: Resolve derive attribute input macro paths in ide layer r=Veykril a=Veykril

Enables goto def, syntax highlighting and hover for `Foo` in `#[derive(Foo)]`.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/4413
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoResolve derive attribute input macro paths in ide layer
Lukas Wirth [Sat, 24 Jul 2021 18:35:38 +0000 (20:35 +0200)]
Resolve derive attribute input macro paths in ide layer

3 years agoMerge #9686
bors[bot] [Sat, 24 Jul 2021 08:21:31 +0000 (08:21 +0000)]
Merge #9686

9686: Bump deps r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoFix typo
Laurențiu Nicola [Sat, 24 Jul 2021 08:20:40 +0000 (11:20 +0300)]
Fix typo

3 years agoBump deps
Laurențiu Nicola [Sat, 24 Jul 2021 08:16:32 +0000 (11:16 +0300)]
Bump deps

3 years agoMerge #9685
bors[bot] [Fri, 23 Jul 2021 18:22:09 +0000 (18:22 +0000)]
Merge #9685

9685: internal: add tests for tuple struct field completion and resolve a FIXME r=jonas-schievink a=jonas-schievink

This removes the last FIXME related to visibility and thus fixes https://github.com/rust-analyzer/rust-analyzer/issues/824

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoResolve tuple field visibility FIXME
Jonas Schievink [Fri, 23 Jul 2021 18:20:41 +0000 (20:20 +0200)]
Resolve tuple field visibility FIXME

3 years agoAdd tests for tuple struct field completion
Jonas Schievink [Fri, 23 Jul 2021 18:20:23 +0000 (20:20 +0200)]
Add tests for tuple struct field completion

3 years agoMerge #9684
bors[bot] [Fri, 23 Jul 2021 18:00:35 +0000 (18:00 +0000)]
Merge #9684

9684: Complete editable private items r=jonas-schievink a=jonas-schievink

This checks if a private item's location is editable (local source root), and completes them anyways if that's the case.

In order to test this, the `new_source_root` fixture command has been changed to take a `local` or `library` value, and to apply to all *following* files instead of the preceding ones (which would be hard to understand).

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoComplete editable private items
Jonas Schievink [Fri, 23 Jul 2021 17:57:16 +0000 (19:57 +0200)]
Complete editable private items

3 years agoMerge #9683
bors[bot] [Fri, 23 Jul 2021 15:07:10 +0000 (15:07 +0000)]
Merge #9683

9683: internal: Move out expression based `unqualified_path` completion tests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd a Union to the base item completion test fixture
Lukas Wirth [Fri, 23 Jul 2021 15:02:39 +0000 (17:02 +0200)]
Add a Union to the base item completion test fixture

3 years agoMerge #9681
bors[bot] [Fri, 23 Jul 2021 14:59:26 +0000 (14:59 +0000)]
Merge #9681

9681: Respect `#[doc(hidden)]` in dot-completion r=jonas-schievink a=jonas-schievink

This adds `CompletionContext::is_visible` as a convenience method that checks visibility, presence of `doc(hidden)`, and whether the completed item is in the same crate as the completion site or not. We only complete `doc(hidden)` items from the same crate.

This doesn't yet work for *all* completions: `qualified_path` completions use `Module::scope` and `ScopeDef`, which doesn't work with this.

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

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix formatting and use `Iterator::any`
Jonas Schievink [Fri, 23 Jul 2021 14:45:14 +0000 (16:45 +0200)]
Fix formatting and use `Iterator::any`

3 years agoMove out unqualified_path completion tests
Lukas Wirth [Fri, 23 Jul 2021 14:37:19 +0000 (16:37 +0200)]
Move out unqualified_path completion tests

3 years agoAdd functions to base items completion test fixture
Lukas Wirth [Fri, 23 Jul 2021 14:09:30 +0000 (16:09 +0200)]
Add functions to base items completion test fixture

3 years agoMerge #9678
bors[bot] [Fri, 23 Jul 2021 13:56:57 +0000 (13:56 +0000)]
Merge #9678

9678: Add Configuration for Highlight Related Feature r=kdelorey a=kdelorey

# Summary
Adds basic configuration that allows you to control when the highlight related feature is activated. You can control this for references, break points, exit points, and yield points.

Resolves #9618

![config](https://user-images.githubusercontent.com/2295721/126728849-a38b560c-b687-42c1-9c41-7584ad718469.gif)

Co-authored-by: Kevin DeLorey <kdelorey.dev@gmail.com>
3 years agoRemoved all dead config accessors.
Kevin DeLorey [Fri, 23 Jul 2021 13:50:37 +0000 (07:50 -0600)]
Removed all dead config accessors.

3 years agoremoved dead code
Kevin DeLorey [Fri, 23 Jul 2021 13:41:55 +0000 (07:41 -0600)]
removed dead code

3 years agoRespect `#[doc(hidden)]` in dot-completion
Jonas Schievink [Fri, 23 Jul 2021 13:36:43 +0000 (15:36 +0200)]
Respect `#[doc(hidden)]` in dot-completion

3 years agoUpdated docs.
Kevin DeLorey [Fri, 23 Jul 2021 01:04:27 +0000 (19:04 -0600)]
Updated docs.

3 years agoAdded tests to ensure config behavior.
Kevin DeLorey [Fri, 23 Jul 2021 00:59:31 +0000 (18:59 -0600)]
Added tests to ensure config behavior.

3 years agoInitial commit of highlight related configuration w/ implementation.
Kevin DeLorey [Thu, 22 Jul 2021 01:44:16 +0000 (19:44 -0600)]
Initial commit of highlight related configuration w/ implementation.

3 years agoMerge #9677
bors[bot] [Fri, 23 Jul 2021 00:15:43 +0000 (00:15 +0000)]
Merge #9677

9677: fix: Correctly classify Rename Names r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoCorrectly classify Rename Names
Lukas Wirth [Fri, 23 Jul 2021 00:14:59 +0000 (02:14 +0200)]
Correctly classify Rename Names

3 years agoMerge #9676
bors[bot] [Thu, 22 Jul 2021 18:19:11 +0000 (18:19 +0000)]
Merge #9676

9676: minor: Describe the current lifetime/label completion specifics r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDescribe the current lifetime/label completion specifics
Lukas Wirth [Thu, 22 Jul 2021 18:16:17 +0000 (20:16 +0200)]
Describe the current lifetime/label completion specifics

3 years agoMerge #9675
bors[bot] [Thu, 22 Jul 2021 18:04:09 +0000 (18:04 +0000)]
Merge #9675

9675: internal: Move and clean up record completion tests r=Veykril a=Veykril

Now all that's left are the expression related tests which will take some time to go through
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoClarify what the outline test module is for
Lukas Wirth [Thu, 22 Jul 2021 17:59:01 +0000 (19:59 +0200)]
Clarify what the outline test module is for

3 years agoMove out record completion tests
Lukas Wirth [Thu, 22 Jul 2021 17:38:49 +0000 (19:38 +0200)]
Move out record completion tests

3 years agoMerge #9674
bors[bot] [Thu, 22 Jul 2021 11:49:18 +0000 (11:49 +0000)]
Merge #9674

9674: fix: Fix pattern name resolution when name is also occupied in type namespace r=flodiebold a=jonas-schievink

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

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #9634
bors[bot] [Thu, 22 Jul 2021 11:43:05 +0000 (11:43 +0000)]
Merge #9634

9634: minor update to excludeDirs doc r=lnicola a=dae

I saw reference to globs in #7755, but it doesn't look like they're
actually supported, and I had to dig through the source to discover
that the folders are relative to the workspace root. Further digging
was required to get VS Code from hanging for long periods trying to
watch giant Bazel folders that had already been excluded from Rust
Analyzer. Hopefully this tweak will save others the confusion :-)

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
3 years agoResolve tuple variants in value namespace
Jonas Schievink [Thu, 22 Jul 2021 11:40:18 +0000 (13:40 +0200)]
Resolve tuple variants in value namespace

3 years agomention files.watcherExclude
Damien Elmes [Thu, 22 Jul 2021 11:03:06 +0000 (21:03 +1000)]
mention files.watcherExclude

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
3 years agoMerge #9453
bors[bot] [Thu, 22 Jul 2021 10:33:05 +0000 (10:33 +0000)]
Merge #9453

9453: Add first-class limits. r=matklad,lnicola a=rbartlensky

Partially fixes #9286.

This introduces a new `Limits` structure which is passed as an input
to `SourceDatabase`. This makes limits accessible almost everywhere in
the code, since most places have a database in scope.

One downside of this approach is that whenever you query limits, you
essentially do an `Arc::clone` which is less than ideal.

Let me know if I missed anything, or would like me to take a different approach!

Co-authored-by: Robert Bartlensky <bartlensky.robert@gmail.com>
3 years agoMerge #9671
bors[bot] [Thu, 22 Jul 2021 06:04:25 +0000 (06:04 +0000)]
Merge #9671

9671: minor: Fix a couple of clippy nits r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoFix a couple of clippy nits
Laurențiu Nicola [Thu, 22 Jul 2021 06:03:54 +0000 (09:03 +0300)]
Fix a couple of clippy nits

3 years agoMerge #9669
bors[bot] [Wed, 21 Jul 2021 19:41:59 +0000 (19:41 +0000)]
Merge #9669

9669: minor: Move out fn_param tests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMove out fn_param tests
Lukas Wirth [Wed, 21 Jul 2021 19:39:40 +0000 (21:39 +0200)]
Move out fn_param tests

3 years agoMerge #9668
bors[bot] [Wed, 21 Jul 2021 18:52:49 +0000 (18:52 +0000)]
Merge #9668

9668: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix some more basic clippy lints
Lukas Wirth [Wed, 21 Jul 2021 18:52:08 +0000 (20:52 +0200)]
Fix some more basic clippy lints

3 years agoMerge #9667
bors[bot] [Wed, 21 Jul 2021 18:38:51 +0000 (18:38 +0000)]
Merge #9667

9667: minor: Remove proc macro ABI issue from bug report template r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoRemove proc macro ABI issue from bug report template
Laurențiu Nicola [Wed, 21 Jul 2021 18:03:06 +0000 (21:03 +0300)]
Remove proc macro ABI issue from bug report template

3 years agoMerge #9666
bors[bot] [Wed, 21 Jul 2021 17:52:57 +0000 (17:52 +0000)]
Merge #9666

9666: minor: Fix some clippy lints in ide_completion r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix some clippy lints in ide_completion
Lukas Wirth [Wed, 21 Jul 2021 17:50:28 +0000 (19:50 +0200)]
Fix some clippy lints in ide_completion

3 years agoMerge #9665
bors[bot] [Wed, 21 Jul 2021 17:05:44 +0000 (17:05 +0000)]
Merge #9665

9665: Only complete ancestors and self in visibility path completions r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoOnly complete ancestors and self in visibility path completions
Lukas Wirth [Wed, 21 Jul 2021 16:54:12 +0000 (18:54 +0200)]
Only complete ancestors and self in visibility path completions

3 years agoMerge #9664
bors[bot] [Wed, 21 Jul 2021 16:47:41 +0000 (16:47 +0000)]
Merge #9664

9664: Minor completions cleanup r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSimplify
Lukas Wirth [Wed, 21 Jul 2021 16:31:12 +0000 (18:31 +0200)]
Simplify

3 years agoMerge #9663
bors[bot] [Wed, 21 Jul 2021 16:00:08 +0000 (16:00 +0000)]
Merge #9663

9663: fix: Don't offer extract_variable assist when there is no surrounding block r=Veykril a=Veykril

Fixes #9143
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #9662
bors[bot] [Wed, 21 Jul 2021 15:53:06 +0000 (15:53 +0000)]
Merge #9662

9662: fix: filter visiblities when resolving in extern crate r=jonas-schievink a=jonas-schievink

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

Also fixes a bunch of incorrect tests that were importing private items.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>