]>
git.lizzy.rs Git - rust.git/log
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>
Lukas Wirth [Thu, 22 Jul 2021 17:59:01 +0000 (19:59 +0200)]
Clarify what the outline test module is for
Lukas Wirth [Thu, 22 Jul 2021 17:38:49 +0000 (19:38 +0200)]
Move out record completion tests
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>
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>
Jonas Schievink [Thu, 22 Jul 2021 11:40:18 +0000 (13:40 +0200)]
Resolve tuple variants in value namespace
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>
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>
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>
Laurențiu Nicola [Thu, 22 Jul 2021 06:03:54 +0000 (09:03 +0300)]
Fix a couple of clippy nits
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>
Lukas Wirth [Wed, 21 Jul 2021 19:39:40 +0000 (21:39 +0200)]
Move out fn_param tests
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>
Lukas Wirth [Wed, 21 Jul 2021 18:52:08 +0000 (20:52 +0200)]
Fix some more basic clippy lints
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>
Laurențiu Nicola [Wed, 21 Jul 2021 18:03:06 +0000 (21:03 +0300)]
Remove proc macro ABI issue from bug report template
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>
Lukas Wirth [Wed, 21 Jul 2021 17:50:28 +0000 (19:50 +0200)]
Fix some clippy lints in ide_completion
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>
Lukas Wirth [Wed, 21 Jul 2021 16:54:12 +0000 (18:54 +0200)]
Only complete ancestors and self in visibility path completions
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>
Lukas Wirth [Wed, 21 Jul 2021 16:31:12 +0000 (18:31 +0200)]
Simplify
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>
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>
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
Jonas Schievink [Wed, 21 Jul 2021 15:51:56 +0000 (17:51 +0200)]
filter visiblities when resolving in extern crate
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>
Tom Dohrmann [Wed, 21 Jul 2021 10:53:50 +0000 (12:53 +0200)]
hide keyword suggestions in non trivial paths
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>
Jesse Jackson [Wed, 21 Jul 2021 09:06:19 +0000 (04:06 -0500)]
docs: fix typo
tree -> three
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>
Florian Diebold [Tue, 20 Jul 2021 20:53:39 +0000 (22:53 +0200)]
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>
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>
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.
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>
Lukas Wirth [Tue, 20 Jul 2021 17:00:52 +0000 (19:00 +0200)]
cov-mark
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>
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
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>
Lukas Wirth [Tue, 20 Jul 2021 16:37:52 +0000 (18:37 +0200)]
Restrict completions inside visibility modifiers
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>
Lukas Wirth [Tue, 20 Jul 2021 16:05:25 +0000 (18:05 +0200)]
More tests
Lukas Wirth [Tue, 20 Jul 2021 15:57:47 +0000 (17:57 +0200)]
Move doc_links tests from hover to doc_links
Lukas Wirth [Tue, 20 Jul 2021 15:41:10 +0000 (17:41 +0200)]
Minor cleanups
Lukas Wirth [Tue, 20 Jul 2021 15:03:39 +0000 (17:03 +0200)]
Some more fragment fixes
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>
Aleksey Kladov [Tue, 20 Jul 2021 14:49:02 +0000 (17:49 +0300)]
minor: address review comments
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>
Aleksey Kladov [Tue, 20 Jul 2021 14:19:02 +0000 (17:19 +0300)]
internal: remove potentially slow method
Aleksey Kladov [Tue, 20 Jul 2021 14:11:09 +0000 (17:11 +0300)]
internal: remove one usage of a slow method
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>
mahdi-frms [Tue, 20 Jul 2021 14:01:35 +0000 (18:31 +0430)]
add 'use' prefix for any auto-import
Aleksey Kladov [Tue, 20 Jul 2021 14:02:16 +0000 (17:02 +0300)]
internal: remove one usage of a slow method
Lukas Wirth [Tue, 20 Jul 2021 14:01:27 +0000 (16:01 +0200)]
Correctly generate link fragments for associated items
Lukas Wirth [Tue, 20 Jul 2021 14:00:44 +0000 (16:00 +0200)]
Cleanup runnables canonical path impl
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>
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?
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>
Aleksey Kladov [Tue, 20 Jul 2021 12:55:44 +0000 (15:55 +0300)]
internal: easier to skim CI logs
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>
Aleksey Kladov [Tue, 20 Jul 2021 11:33:08 +0000 (14:33 +0300)]
minor: publish la_arena
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>
Aleksey Kladov [Mon, 19 Jul 2021 20:40:20 +0000 (23:40 +0300)]
docs: publish Explaining Rust Analyzer series
Lukas Wirth [Mon, 19 Jul 2021 18:36:44 +0000 (20:36 +0200)]
Resolve paths to assoc items for traits
bors[bot] [Mon, 19 Jul 2021 18:22:30 +0000 (18:22 +0000)]
Merge #9638
9638: internal: replace some unwraps with types r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 19 Jul 2021 18:21:41 +0000 (21:21 +0300)]
minor: simplify
Aleksey Kladov [Mon, 19 Jul 2021 18:20:10 +0000 (21:20 +0300)]
internal: use types to remove some unwraps
Lukas Wirth [Mon, 19 Jul 2021 17:57:55 +0000 (19:57 +0200)]
Add doc-link resolution test infra
Aleksey Kladov [Mon, 19 Jul 2021 16:18:39 +0000 (19:18 +0300)]
minor: typo
bors[bot] [Mon, 19 Jul 2021 15:28:36 +0000 (15:28 +0000)]
Merge #9625
9625: internal: simplify handling of the build scripts r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Mon, 19 Jul 2021 15:18:01 +0000 (15:18 +0000)]
Merge #9635
9635: internal: explain why we avoid serializing everything r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 19 Jul 2021 14:47:56 +0000 (17:47 +0300)]
internal: explain why we avoid serializing everything
bors[bot] [Mon, 19 Jul 2021 13:39:28 +0000 (13:39 +0000)]
Merge #9631
9631: Added some metadata for rust-analyzer package sufficient to build a package using `cargo deb` r=matklad a=KOLANICH
Co-authored-by: KOLANICH <kolan_n@mail.ru>
Aleksey Kladov [Mon, 19 Jul 2021 13:35:29 +0000 (16:35 +0300)]
remove debug prints
Aleksey Kladov [Mon, 19 Jul 2021 13:24:45 +0000 (16:24 +0300)]
fix tests
KOLANICH [Mon, 19 Jul 2021 12:39:49 +0000 (15:39 +0300)]
Added some metadata for rust-analyser package sufficient to build it using `cargo deb`
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Damien Elmes [Mon, 19 Jul 2021 13:09:29 +0000 (23:09 +1000)]
minor update to excludeDirs doc
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 :-)
bors[bot] [Mon, 19 Jul 2021 13:00:57 +0000 (13:00 +0000)]
Merge #9633
9633: internal: Add `TreeId` to identify `ItemTree`s r=jonas-schievink a=jonas-schievink
With per-block `ItemTree`s, the file ID will not be enough to identify an `ItemTree`.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Mon, 19 Jul 2021 12:53:18 +0000 (14:53 +0200)]
Add `TreeId` to identify `ItemTree`s
With per-block `ItemTree`s, the file ID is not enough to identify an
`ItemTree`.
Robert Bartlensky [Sat, 10 Jul 2021 20:49:17 +0000 (21:49 +0100)]
Add `Limit` struct.
Fixes #9286.
bors[bot] [Mon, 19 Jul 2021 02:54:09 +0000 (02:54 +0000)]
Merge #9627
9627: fix: Typo in architecture.md r=lnicola a=alexfertel
Co-authored-by: Alexander Gonzalez <alexfertel97@gmail.com>
Alexander Gonzalez [Mon, 19 Jul 2021 02:17:45 +0000 (22:17 -0400)]
fix: Typo in architecture.md
Florian Diebold [Thu, 15 Jul 2021 18:02:58 +0000 (20:02 +0200)]
Determine expected parameters from expected return in calls
Fixes #9560
Aleksey Kladov [Sun, 18 Jul 2021 10:13:03 +0000 (13:13 +0300)]
fix: potential bugs when build scripts do not match the current project
bors[bot] [Sun, 18 Jul 2021 09:10:56 +0000 (09:10 +0000)]
Merge #9619
9619: Support GATs for associated type arg parsing r=Veykril a=Veykril
Fixes #9602
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 17 Jul 2021 11:47:53 +0000 (13:47 +0200)]
Support GATs for associated type arg parsing
Aleksey Kladov [Sun, 18 Jul 2021 08:29:22 +0000 (11:29 +0300)]
internal: simplify handling of the build scripts
bors[bot] [Sun, 18 Jul 2021 07:26:05 +0000 (07:26 +0000)]
Merge #9624
9624: minor: Fix `AbsPath::ends_with` r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Sun, 18 Jul 2021 07:25:14 +0000 (10:25 +0300)]
Fix AbsPath::ends_with
bors[bot] [Sat, 17 Jul 2021 21:16:43 +0000 (21:16 +0000)]
Merge #9623
9623: internal: make it clearer where IO happens r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 17 Jul 2021 20:43:54 +0000 (23:43 +0300)]
internal: make it clearer where IO happens
bors[bot] [Sat, 17 Jul 2021 19:41:42 +0000 (19:41 +0000)]
Merge #9622
9622: feat: improve parser error recovery for function parameters r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 17 Jul 2021 19:41:04 +0000 (22:41 +0300)]
feat: improve parser error recovery for function parameters
bors[bot] [Sat, 17 Jul 2021 15:14:02 +0000 (15:14 +0000)]
Merge #9620
9620: internal: don't depend on cwd r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 17 Jul 2021 14:40:13 +0000 (17:40 +0300)]
internal: a bit more of cwd safety for flycheck
bors[bot] [Sat, 17 Jul 2021 15:04:55 +0000 (15:04 +0000)]
Merge #9621
9621: Remove outdated "(not yet released)" hint r=lnicola a=cakebaker
Neovim 0.5 has been released recently (see http://neovim.io/news/2021/07), hence the "(not yet released)" hint is no longer needed.
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Daniel Hofstetter [Sat, 17 Jul 2021 14:56:26 +0000 (16:56 +0200)]
Remove outdated "(not yet released)" hint
Neovim 0.5 has been released recently (see http://neovim.io/news/2021/07), hence the "(not yet released)" hint is no longer needed.
Aleksey Kladov [Sat, 17 Jul 2021 13:54:48 +0000 (16:54 +0300)]
internal: make sure that proc macro machinery doesn't depend on cwd
Aleksey Kladov [Sat, 17 Jul 2021 13:43:33 +0000 (16:43 +0300)]
internal: make it easier to isolate IO