]> git.lizzy.rs Git - rust.git/log
rust.git
2 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>
2 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>
2 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

2 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>
2 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>
2 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>
2 years agoFix some grammar / spelling mistakes
Jonas Platte [Mon, 26 Jul 2021 08:12:41 +0000 (10:12 +0200)]
Fix some grammar / spelling mistakes

2 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.

2 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>
2 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

2 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>
2 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

2 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>
2 years agoFix typo
Laurențiu Nicola [Sat, 24 Jul 2021 08:20:40 +0000 (11:20 +0300)]
Fix typo

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

2 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>
2 years agoResolve tuple field visibility FIXME
Jonas Schievink [Fri, 23 Jul 2021 18:20:41 +0000 (20:20 +0200)]
Resolve tuple field visibility FIXME

2 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

2 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>
2 years agoComplete editable private items
Jonas Schievink [Fri, 23 Jul 2021 17:57:16 +0000 (19:57 +0200)]
Complete editable private items

2 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>
2 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

2 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>
2 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`

2 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

2 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

2 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>
2 years agoRemoved all dead config accessors.
Kevin DeLorey [Fri, 23 Jul 2021 13:50:37 +0000 (07:50 -0600)]
Removed all dead config accessors.

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

2 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

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

2 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.

2 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.

2 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>
2 years agoCorrectly classify Rename Names
Lukas Wirth [Fri, 23 Jul 2021 00:14:59 +0000 (02:14 +0200)]
Correctly classify Rename Names

2 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>
2 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

2 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>
2 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

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

2 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>
2 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>
2 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

2 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>
2 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>
2 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>
2 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

2 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>
2 years agoMove out fn_param tests
Lukas Wirth [Wed, 21 Jul 2021 19:39:40 +0000 (21:39 +0200)]
Move out fn_param tests

2 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>
2 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

2 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>
2 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

2 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>
2 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

2 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>
2 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

2 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>
2 years agoSimplify
Lukas Wirth [Wed, 21 Jul 2021 16:31:12 +0000 (18:31 +0200)]
Simplify

2 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>
2 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>
2 years agoDon't offer extract_variable assist when there is no surrounding block
Lukas Wirth [Wed, 21 Jul 2021 15:52:17 +0000 (17:52 +0200)]
Don't offer extract_variable assist when there is no surrounding block

2 years agofilter visiblities when resolving in extern crate
Jonas Schievink [Wed, 21 Jul 2021 15:51:56 +0000 (17:51 +0200)]
filter visiblities when resolving in extern crate

2 years agoMerge #9660
bors[bot] [Wed, 21 Jul 2021 12:57:30 +0000 (12:57 +0000)]
Merge #9660

9660: hide keyword suggestions in non trivial paths r=Veykril a=Freax13

This pr hides keyword suggestions in non trivial paths:
![now](https://user-images.githubusercontent.com/14952658/126479635-819127d8-322b-4e34-acd2-194d1e9ba504.png)

Previously rust analyzer suggested a lot of keywords even when completing non trivial paths:
![prev](https://user-images.githubusercontent.com/14952658/126478222-54c742bb-2bd3-4e5b-b533-f835264604be.png)

This had 2 problems:
1. Suggesting a keyword in this position doesn't make sense.
2. There are a lot of keywords, so they make it a lot harder to find the things you're actually looking for (note the scrollbar and that `instructions`, `registers` and `structures` are not visible).

Co-authored-by: Tom Dohrmann <erbse.13@gmx.de>
2 years agohide keyword suggestions in non trivial paths
Tom Dohrmann [Wed, 21 Jul 2021 10:53:50 +0000 (12:53 +0200)]
hide keyword suggestions in non trivial paths

2 years agoMerge #9658
bors[bot] [Wed, 21 Jul 2021 09:07:54 +0000 (09:07 +0000)]
Merge #9658

9658: docs: fix typo r=lnicola a=jsejcksn

tree -> three

Co-authored-by: Jesse Jackson <jsejcksn@users.noreply.github.com>
2 years agodocs: fix typo
Jesse Jackson [Wed, 21 Jul 2021 09:06:19 +0000 (04:06 -0500)]
docs: fix typo

tree -> three

2 years agoMerge #9656
bors[bot] [Tue, 20 Jul 2021 20:55:21 +0000 (20:55 +0000)]
Merge #9656

9656: Revert #9655 because it breaks some type inference r=flodiebold a=flodiebold

This reverts commit 8c8c6fb73da613b915e4b18decd74f06d46ab76a, reversing
changes made to ec7b4cbf8f7d6d88ae5280b72a93a7e5d0adb7c4.

bors r+

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2 years agoRevert "Merge #9655"
Florian Diebold [Tue, 20 Jul 2021 20:53:39 +0000 (22:53 +0200)]
Revert "Merge #9655"

This reverts commit 8c8c6fb73da613b915e4b18decd74f06d46ab76a, reversing
changes made to ec7b4cbf8f7d6d88ae5280b72a93a7e5d0adb7c4.

2 years agoMerge #9655
bors[bot] [Tue, 20 Jul 2021 20:17:03 +0000 (20:17 +0000)]
Merge #9655

9655: fix: Determine expected parameters from expected return in calls r=flodiebold a=flodiebold

Fixes #9560

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2 years agoMerge #9654
bors[bot] [Tue, 20 Jul 2021 17:23:18 +0000 (17:23 +0000)]
Merge #9654

9654: minor: remove dead code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: remove dead code
Aleksey Kladov [Tue, 20 Jul 2021 17:18:39 +0000 (20:18 +0300)]
minor: remove dead code

It has been living in RootDatabase::apply_change almost a year by now.

2 years agoMerge #9653
bors[bot] [Tue, 20 Jul 2021 17:04:56 +0000 (17:04 +0000)]
Merge #9653

9653: minor: cov-mark r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agocov-mark
Lukas Wirth [Tue, 20 Jul 2021 17:00:52 +0000 (19:00 +0200)]
cov-mark

2 years agoMerge #9652
bors[bot] [Tue, 20 Jul 2021 16:58:30 +0000 (16:58 +0000)]
Merge #9652

9652: Don't concat path in replace_qualified assist when they start with a keyword r=Veykril a=Veykril

Also keep the path if we can't find a path to the item instead of becoming non applicable.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoDon't concat path in replace_qualified assist when they start with a keyword
Lukas Wirth [Tue, 20 Jul 2021 16:57:12 +0000 (18:57 +0200)]
Don't concat path in replace_qualified assist when they start with a keyword

2 years agoMerge #9651
bors[bot] [Tue, 20 Jul 2021 16:38:40 +0000 (16:38 +0000)]
Merge #9651

9651: Restrict completions inside visibility modifiers r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoRestrict completions inside visibility modifiers
Lukas Wirth [Tue, 20 Jul 2021 16:37:52 +0000 (18:37 +0200)]
Restrict completions inside visibility modifiers

2 years agoMerge #9637
bors[bot] [Tue, 20 Jul 2021 16:06:37 +0000 (16:06 +0000)]
Merge #9637

9637: Overhaul doc_links testing infra r=Veykril a=Veykril

and fix several issues with current implementation.

Fixes #9617

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMore tests
Lukas Wirth [Tue, 20 Jul 2021 16:05:25 +0000 (18:05 +0200)]
More tests

2 years agoMove doc_links tests from hover to doc_links
Lukas Wirth [Tue, 20 Jul 2021 15:57:47 +0000 (17:57 +0200)]
Move doc_links tests from hover to doc_links

2 years agoMinor cleanups
Lukas Wirth [Tue, 20 Jul 2021 15:41:10 +0000 (17:41 +0200)]
Minor cleanups

2 years agoSome more fragment fixes
Lukas Wirth [Tue, 20 Jul 2021 15:03:39 +0000 (17:03 +0200)]
Some more fragment fixes

2 years agoMerge #9648
bors[bot] [Tue, 20 Jul 2021 14:50:43 +0000 (14:50 +0000)]
Merge #9648

9648: minor: address review comments r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: address review comments
Aleksey Kladov [Tue, 20 Jul 2021 14:49:02 +0000 (17:49 +0300)]
minor: address review comments

2 years agoMerge #9647
bors[bot] [Tue, 20 Jul 2021 14:20:31 +0000 (14:20 +0000)]
Merge #9647

9647: internal: remove potentially slow method r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: remove potentially slow method
Aleksey Kladov [Tue, 20 Jul 2021 14:19:02 +0000 (17:19 +0300)]
internal: remove potentially slow method

2 years agointernal: remove one usage of a slow method
Aleksey Kladov [Tue, 20 Jul 2021 14:11:09 +0000 (17:11 +0300)]
internal: remove one usage of a slow method

2 years agoMerge #9646
bors[bot] [Tue, 20 Jul 2021 14:09:24 +0000 (14:09 +0000)]
Merge #9646

9646: add 'use' prefix for any auto-import r=Veykril a=mahdi-frms

Fixes #9643

looks like there was an if condition that had to be removed.

Co-authored-by: mahdi-frms <mahdif1380@outlook.com>
2 years agoadd 'use' prefix for any auto-import
mahdi-frms [Tue, 20 Jul 2021 14:01:35 +0000 (18:31 +0430)]
add 'use' prefix for any auto-import

2 years agointernal: remove one usage of a slow method
Aleksey Kladov [Tue, 20 Jul 2021 14:02:16 +0000 (17:02 +0300)]
internal: remove one usage of a slow method

2 years agoCorrectly generate link fragments for associated items
Lukas Wirth [Tue, 20 Jul 2021 14:01:27 +0000 (16:01 +0200)]
Correctly generate link fragments for associated items

2 years agoCleanup runnables canonical path impl
Lukas Wirth [Tue, 20 Jul 2021 14:00:44 +0000 (16:00 +0200)]
Cleanup runnables canonical path impl

2 years agoMerge #9644
bors[bot] [Tue, 20 Jul 2021 13:31:11 +0000 (13:31 +0000)]
Merge #9644

9644: internal: add simple smoke test for project model r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: add simple smoke test for project model
Aleksey Kladov [Tue, 20 Jul 2021 12:38:20 +0000 (15:38 +0300)]
internal: add simple smoke test for project model

Our project model code is rather complicated -- the logic for lowering
from `cargo metadata` to `CrateGraph` is fiddly and special-case. So
far, we survived without testing this at all, but this increasingly
seems like a poor option.

So this PR introduces a simple tests just to detect the most obvious
failures. The idea here is that, although we rely on external processes
(cargo & rustc), we are actually using their stable interfaces, so we
might just mock out the outputs.

Long term, I would like to try to virtualize IO here, so as to do such
mocking in a more principled way, but lets start simple.

Should we forgo the mocking and just call `cargo metadata` directly
perhaps? Touch question -- I personally feel that fast, in-process tests
are more important in this case than any extra assurance we get from
running the real thing.

Super-long term, we would probably want to extend our heavy tests to
cover more use-cases, but we should figure a way to do that without
slowing the tests down for everyone.

Perhaps we need two-tiered bors system, where we pull from `master` into
`release` branch only when an additional set of tests passes?

2 years agoMerge #9645
bors[bot] [Tue, 20 Jul 2021 12:58:31 +0000 (12:58 +0000)]
Merge #9645

9645: internal: easier to skim CI logs r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: easier to skim CI logs
Aleksey Kladov [Tue, 20 Jul 2021 12:55:44 +0000 (15:55 +0300)]
internal: easier to skim CI logs

2 years agoMerge #9642
bors[bot] [Tue, 20 Jul 2021 11:33:34 +0000 (11:33 +0000)]
Merge #9642

9642: minor: publish la_arena r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: publish la_arena
Aleksey Kladov [Tue, 20 Jul 2021 11:33:08 +0000 (14:33 +0300)]
minor: publish la_arena

2 years agoMerge #9641
bors[bot] [Tue, 20 Jul 2021 09:57:12 +0000 (09:57 +0000)]
Merge #9641

9641: docs: publish Explaining Rust Analyzer series r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>