]>
git.lizzy.rs Git - rust.git/log
Dawer [Thu, 6 May 2021 05:06:52 +0000 (10:06 +0500)]
Adapt to a new rowan borrowing node API.
Dawer [Thu, 6 May 2021 05:04:39 +0000 (10:04 +0500)]
Update to rowan 0.13.0-pre.5
bors[bot] [Wed, 5 May 2021 21:14:12 +0000 (21:14 +0000)]
Merge #8674
8674: fix for #8664: Emit folding ranges for multi-line where clauses r=matklad a=m5tfi
#8664
I added a test that assert folding multi-line where clauses while leaving single lined one. Please, let me know if the code needs further improvements.
Co-authored-by: m5tfi <72708423+m5tfi@users.noreply.github.com>
bors[bot] [Wed, 5 May 2021 21:03:50 +0000 (21:03 +0000)]
Merge #8736
8736: Update salsa r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Wed, 5 May 2021 21:00:29 +0000 (23:00 +0200)]
Update salsa
bors[bot] [Wed, 5 May 2021 20:56:42 +0000 (20:56 +0000)]
Merge #8735
8735: simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
Lukas Tobias Wirth [Wed, 5 May 2021 20:55:12 +0000 (22:55 +0200)]
simplify
m5tfi [Wed, 5 May 2021 04:27:16 +0000 (06:27 +0200)]
remove unneeded `visited_where_clauses`
bors[bot] [Tue, 4 May 2021 20:36:26 +0000 (20:36 +0000)]
Merge #8733
8733: Add some cov marks for qualified_path completion r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
Lukas Tobias Wirth [Tue, 4 May 2021 20:35:37 +0000 (22:35 +0200)]
Add some cov marks for qualified_path completion
bors[bot] [Tue, 4 May 2021 19:42:30 +0000 (19:42 +0000)]
Merge #8732
8732: internal: refactor expansion queries r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 4 May 2021 19:40:10 +0000 (22:40 +0300)]
Document expansion queries
Aleksey Kladov [Tue, 4 May 2021 19:20:04 +0000 (22:20 +0300)]
simplify macro expansion code
Using `Option` arguments such that you always pass `None` or `Some` at
the call site is a code smell.
Aleksey Kladov [Tue, 4 May 2021 19:03:16 +0000 (22:03 +0300)]
make illegal states unrepresentable
only declarative macros have def-site token map
Aleksey Kladov [Tue, 4 May 2021 18:49:00 +0000 (21:49 +0300)]
Cleanups
bors[bot] [Tue, 4 May 2021 19:05:19 +0000 (19:05 +0000)]
Merge #8731
8731: Complete enum variants through type aliases r=Veykril a=Veykril
Fixes #8730
bors r+
Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
Lukas Tobias Wirth [Tue, 4 May 2021 19:03:35 +0000 (21:03 +0200)]
Complete enum variants through type aliases
bors[bot] [Tue, 4 May 2021 17:37:09 +0000 (17:37 +0000)]
Merge #8727
8727: minor: use standard import style r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 4 May 2021 17:36:48 +0000 (20:36 +0300)]
minor: use standard import style
bors[bot] [Tue, 4 May 2021 17:29:55 +0000 (17:29 +0000)]
Merge #8726
8726: internal: reduce visibility r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 4 May 2021 17:29:30 +0000 (20:29 +0300)]
internal: reduce visibility
bors[bot] [Tue, 4 May 2021 15:31:10 +0000 (15:31 +0000)]
Merge #8725
8725: internal: env var to toggle slow benches r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 4 May 2021 15:21:36 +0000 (18:21 +0300)]
internal: env var to toggle slow benches
bors[bot] [Tue, 4 May 2021 15:20:38 +0000 (15:20 +0000)]
Merge #8724
8724: minor: unconfuse myself about macro def vs macro rules r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 4 May 2021 15:20:10 +0000 (18:20 +0300)]
minor: unconfuse myself about macro def vs macro rules
bors[bot] [Tue, 4 May 2021 12:14:56 +0000 (12:14 +0000)]
Merge #8720
8720: internal: add integrated completion benchmark r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 4 May 2021 11:02:23 +0000 (14:02 +0300)]
internal: add integrated completion benchmark
bors[bot] [Tue, 4 May 2021 12:00:30 +0000 (12:00 +0000)]
Merge #8719
8719: Fix block comment intra doc link injection ranges r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
Lukas Tobias Wirth [Tue, 4 May 2021 11:51:57 +0000 (13:51 +0200)]
Fix block comment intra doc link injection ranges
bors[bot] [Tue, 4 May 2021 11:51:09 +0000 (11:51 +0000)]
Merge #8711
8711: Only resolve selected assist r=matklad a=SomeoneToIgnore
Part of https://github.com/rust-analyzer/rust-analyzer/issues/8700
Now resolves only the assist that was selected out of the list, while before the whole assist list was resolved despite a single popup selection.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Aleksey Kladov [Tue, 4 May 2021 07:23:47 +0000 (10:23 +0300)]
More searchable name
bors[bot] [Tue, 4 May 2021 07:07:06 +0000 (07:07 +0000)]
Merge #8714
8714: internal: remove one more usage of the rewriter r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 3 May 2021 19:33:27 +0000 (22:33 +0300)]
internal: remove one more usage of the rewriter
bors[bot] [Tue, 4 May 2021 03:41:48 +0000 (03:41 +0000)]
Merge #8716
8716: Replace `memmap` with `memmap2` in `proc_macro_api` r=edwin0cheng a=memoryruins
#7522 did the same for `proc_macro_srv` before this usage of `memmap` was introduced to `proc_macro_api` in #6822 .
Something like [`cargo-deny`](https://github.com/EmbarkStudios/cargo-deny-action) could help prevent specific crates (and versions, licenses, etc) from being introduced into the crate tree, but that's unrelated to this pull request.
Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
memoryruins [Tue, 4 May 2021 00:20:47 +0000 (20:20 -0400)]
Replace `memmap` to `memmap2` in `proc_macro_api`
Kirill Bulatov [Mon, 3 May 2021 19:58:53 +0000 (22:58 +0300)]
Code review fixes
bors[bot] [Mon, 3 May 2021 19:36:40 +0000 (19:36 +0000)]
Merge #8715
8715: Make CompletionContext expected_type smarter r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
Lukas Tobias Wirth [Mon, 3 May 2021 19:34:34 +0000 (21:34 +0200)]
Make CompletionContext expected_type smarter
bors[bot] [Mon, 3 May 2021 16:57:51 +0000 (16:57 +0000)]
Merge #8482
8482: Mention how to customize unsafe operation styles r=matklad a=danielzfranklin
I was confused about how to do this, so I filed #8474. I apologize for initially filing this incorrectly and spamming people.
Co-authored-by: Daniel Franklin <daniel@danielzfranklin.org>
Daniel Franklin [Mon, 3 May 2021 16:54:09 +0000 (17:54 +0100)]
Merge with semantic style section
bors[bot] [Mon, 3 May 2021 16:36:59 +0000 (16:36 +0000)]
Merge #8712
8712: Map nodes to their mutable counterpart before mutating in reorder_impl r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
Lukas Tobias Wirth [Mon, 3 May 2021 16:22:18 +0000 (18:22 +0200)]
Don't mutate the tree while traversing in reorder_impl
Kirill Bulatov [Mon, 3 May 2021 16:35:44 +0000 (19:35 +0300)]
Index retrieval fix
Kirill Bulatov [Mon, 3 May 2021 16:00:24 +0000 (19:00 +0300)]
Touch lsp-extensions.md
Kirill Bulatov [Mon, 3 May 2021 15:44:58 +0000 (18:44 +0300)]
Small fixes
Kirill Bulatov [Mon, 3 May 2021 15:40:04 +0000 (18:40 +0300)]
Tests added
Kirill Bulatov [Mon, 3 May 2021 15:18:45 +0000 (18:18 +0300)]
Less panics in the assist resolution
Kirill Bulatov [Mon, 3 May 2021 15:16:35 +0000 (18:16 +0300)]
Add docs and use better naming
Kirill Bulatov [Mon, 3 May 2021 15:03:28 +0000 (18:03 +0300)]
Resolve single assist only
Kirill Bulatov [Mon, 3 May 2021 14:08:09 +0000 (17:08 +0300)]
Add a way to resolve certain assists
bors[bot] [Mon, 3 May 2021 14:00:07 +0000 (14:00 +0000)]
Merge #8710
8710: feat: build releases with lto=true r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 3 May 2021 13:55:30 +0000 (16:55 +0300)]
feat: build releases with lto=true
closes #8050
bors[bot] [Mon, 3 May 2021 13:37:12 +0000 (13:37 +0000)]
Merge #8427
8427: Move CI to rust-cache Action r=matklad a=Swatinem
This is humbling. I actually took inspiration from RAs pre-cache xtask when developing my action ;-)
Closes #7731
Co-authored-by: Arpad Borsos <swatinem@swatinem.de>
bors[bot] [Sun, 2 May 2021 19:18:18 +0000 (19:18 +0000)]
Merge #8709
8709: cargo update r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Sun, 2 May 2021 19:17:04 +0000 (15:17 -0400)]
cargo update
bors[bot] [Sun, 2 May 2021 18:45:22 +0000 (18:45 +0000)]
Merge #8708
8708: fix: don't duplicate Progerss::Finised for cache priming r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 2 May 2021 18:45:00 +0000 (21:45 +0300)]
fix: don't duplicate Progerss::Finised for cache priming
bors[bot] [Sun, 2 May 2021 18:34:29 +0000 (18:34 +0000)]
Merge #8693
8693: Ensure that only one cache priming task can run at a time r=matklad a=Bobo1239
Fixes #8632.
Co-authored-by: Boris-Chengbiao Zhou <bobo1239@web.de>
bors[bot] [Sat, 1 May 2021 09:15:54 +0000 (09:15 +0000)]
Merge #8701
8701: Fix feature description inconsistency r=Veykril a=brandondong
![image](https://user-images.githubusercontent.com/
13722457 /
116768676 -
4d0d6980 -a9ed-11eb-8d7e-
c7d340a99064 .png)
Just something that bugged me :)
Co-authored-by: Brandon <brandondong604@hotmail.com>
Brandon [Sat, 1 May 2021 02:47:41 +0000 (19:47 -0700)]
Fix feature description inconsistency
bors[bot] [Fri, 30 Apr 2021 16:42:24 +0000 (16:42 +0000)]
Merge #8698
8698: fix: search only crate-level prelude when looking for an item r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8688
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Fri, 30 Apr 2021 16:41:18 +0000 (18:41 +0200)]
find_path: check only crate-level prelude
Boris-Chengbiao Zhou [Thu, 29 Apr 2021 19:12:48 +0000 (21:12 +0200)]
Ensure that only one cache priming task can run at a time
Fixes #8632.
bors[bot] [Fri, 30 Apr 2021 09:07:24 +0000 (09:07 +0000)]
Merge #8692
8692: Fix panic caused by new Try trait definition r=flodiebold a=flodiebold
The new Try trait definition caused a query cycle for us. This adds recovery for that cycle, but also fixes the cause, which is that we went through the supertraits when resolving `<T as Trait>::Assoc`, which isn't actually necessary. I also rewrote `all_super_trait_refs` to an iterator before I realized what the actual problem was, so I kept that.
Fixes #8686.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
bors[bot] [Fri, 30 Apr 2021 08:57:17 +0000 (08:57 +0000)]
Merge #8695
8695: internal: fix naming polarity r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 30 Apr 2021 08:55:59 +0000 (11:55 +0300)]
internal: fix naming polarity
Type Constructors have *parameters*, when they are substituted with type
*arguments*, we have a type.
Aleksey Kladov [Fri, 30 Apr 2021 08:52:31 +0000 (11:52 +0300)]
internal: normalize name
All def types in hir are unsubstituted
m5tfi [Fri, 30 Apr 2021 08:18:36 +0000 (10:18 +0200)]
add folding for where clauses
Florian Diebold [Thu, 29 Apr 2021 18:21:50 +0000 (20:21 +0200)]
Don't look in super traits for <T as Trait>::Assoc
This isn't actually how it works, you have to specify the exact trait
that has the associated type.
Fixes #8686.
Florian Diebold [Thu, 29 Apr 2021 18:18:41 +0000 (20:18 +0200)]
Rewrite all_super_trait_refs as an iterator
Doesn't fix the bug I was trying to fix, but now that I did it anyway it
seems fine to keep.
Florian Diebold [Thu, 29 Apr 2021 18:00:43 +0000 (20:00 +0200)]
Handle cycles in generic_defaults more gracefully
Florian Diebold [Thu, 29 Apr 2021 18:00:21 +0000 (20:00 +0200)]
Add test for #8686
bors[bot] [Thu, 29 Apr 2021 07:45:37 +0000 (07:45 +0000)]
Merge #8687
8687: fix: closure unify without check ClosureId r=lnicola a=komonad
Previously, the unification of closure types is blocked by `Ty.equals_ctor` which compares the ClosureId of the closures. Here is a workaround to allow closures to unify their substitutions.
Fixes #8604.
Co-authored-by: Comonad <comonad@foxmail.com>
Comonad [Thu, 29 Apr 2021 07:26:41 +0000 (15:26 +0800)]
fix: closure unify without check ClosureId
closes #8604
bors[bot] [Thu, 29 Apr 2021 01:09:37 +0000 (01:09 +0000)]
Merge #8685
8685: feat: parse const param defaults r=jonas-schievink a=jonas-schievink
These will probably be stabilized in a few releases, let's make sure we can at least parse them
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Thu, 29 Apr 2021 01:07:53 +0000 (03:07 +0200)]
Parse const param defaults
bors[bot] [Thu, 29 Apr 2021 00:28:27 +0000 (00:28 +0000)]
Merge #8684
8684: Correctly parse negated literals as const args r=jonas-schievink a=jonas-schievink
Previously we didn't accept `S::<-0>;`
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Thu, 29 Apr 2021 00:16:22 +0000 (02:16 +0200)]
Correctly parse negated literals as const args
bors[bot] [Wed, 28 Apr 2021 10:13:52 +0000 (10:13 +0000)]
Merge #8683
8683: internal: ensure that client and server-side configs are not mixed up r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 28 Apr 2021 10:06:46 +0000 (13:06 +0300)]
internal: ensure that client and server-side configs are not mixed up
https://github.com/rust-lang/rust/issues/84647 would help big time here.
bors[bot] [Tue, 27 Apr 2021 20:41:35 +0000 (20:41 +0000)]
Merge #8624
8624: Automatically detect rust library source file map r=vsrs a=vsrs
This PR adds a new possible `rust-analyzer.debug.sourceFileMap` value:
```json
{
"rust-analyzer.debug.sourceFileMap": "auto"
}
```
I did not make it the default because it uses two shell calls (`rustc --print sysroot` and `rustc -V -v`). First one can be slow (https://github.com/rust-lang/rustup/issues/783)
Fixes #8619
Co-authored-by: vsrs <vit@conrlab.com>
bors[bot] [Tue, 27 Apr 2021 13:22:09 +0000 (13:22 +0000)]
Merge #8629 #8657
8629: Allow pressing | to surround closure arguments in VSCode r=matklad a=Smittyvb
This makes pressing <kbd>|</kbd> while some text is selected surround that text with pipes. This is useful when writing closures.
In this demo, I press <kbd>|</kbd> to easily surround some text (`predicate`) with pipe characters to create a closure. Before, this would have replaced `predicate` with just `|`.
![](https://user-images.githubusercontent.com/
10530973 /
115778847 -
3c257e00 -a385-11eb-8c80-
e0db970747db .gif)
(I am getting failures when I do `cargo test` even on `master` locally (due to #8585 I think), but GH Actions is fine with this)
8657: npm update r=matklad a=kjeremy
Co-authored-by: Smittyvb <me@smitop.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
bors[bot] [Tue, 27 Apr 2021 13:10:22 +0000 (13:10 +0000)]
Merge #8679
8679: fix: don't show error message for a valid notification r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 27 Apr 2021 13:04:12 +0000 (16:04 +0300)]
fix: don't show error message for a valid notification
Closes #6782, #6772
bors[bot] [Tue, 27 Apr 2021 11:51:03 +0000 (11:51 +0000)]
Merge #8677
8677: Return ServerNotInitialized according to the spec r=kjeremy a=kjeremy
According to the spec we should return ServerNotInitialized if the server is waiting for an initialize request and something else comes in.
Upgrading to lsp-server 0.5.1 will do this and retry until the initialize request comes in.
Fixes #8581
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Tue, 27 Apr 2021 11:47:06 +0000 (07:47 -0400)]
Return ServerNotInitialized according to the spec
According to the spec we should return ServerNotInitialized if the server is waiting for an initialize request and something else comes in.
Upgrading to lsp-server 0.5.1 will do this and retry until the initialize request comes in.
Fixes #8581
bors[bot] [Tue, 27 Apr 2021 08:31:35 +0000 (08:31 +0000)]
Merge #8617
8617: Add option to opt out of smaller font size for inlay hints. r=SomeoneToIgnore a=jmederosalvarado
As requested on issue #6883 this PR provides an option for users to opt out of the smaller font size for inlay hints. Part of #6883.
Co-authored-by: Jorge Mederos Alvarado <jmederosalvarado@gmail.com>
Jorge Mederos Alvarado [Tue, 27 Apr 2021 00:26:36 +0000 (20:26 -0400)]
Fix how and when old inlay hint decorations are disposed
Jorge Mederos Alvarado [Wed, 21 Apr 2021 21:14:17 +0000 (17:14 -0400)]
Add config options
Jorge Mederos Alvarado [Wed, 21 Apr 2021 19:48:57 +0000 (15:48 -0400)]
Add option to opt out from smaller inlay hints font size
Jorge Mederos Alvarado [Wed, 21 Apr 2021 19:09:41 +0000 (15:09 -0400)]
add option to package.json
bors[bot] [Mon, 26 Apr 2021 16:31:19 +0000 (16:31 +0000)]
Merge #8671
8671: minor: simplify r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 26 Apr 2021 16:30:50 +0000 (19:30 +0300)]
minor: simplify
bors[bot] [Mon, 26 Apr 2021 16:18:02 +0000 (16:18 +0000)]
Merge #8670
8670: fix: make error message in the status bar more useful r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 26 Apr 2021 16:16:07 +0000 (19:16 +0300)]
fix: make error message in the status bar more useful
At the moment,the popup is just a bazillion of Cargo's "Compiling this\nCompiling that",
which is not that useful.
--quiet still displays error, which is what we needc
bors[bot] [Mon, 26 Apr 2021 14:17:05 +0000 (14:17 +0000)]
Merge #8668
8668: Use more cross-platform utc `date` argument r=matklad a=SomeoneToIgnore
Part of https://github.com/rust-analyzer/rust-analyzer/issues/8571
```
$ docker run -it --rm ubuntu:20.04 bash
root@
7393d1e7bbad :/# date -u +%Y-%m-%d
2021-04-26
```
```
$ date -u +%Y-%m-%d
2021-04-26
$ uname -a
Darwin alaptop.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
```
Some of the places where I've change this do not really require it (since macos bin would have failed with `--iso` param also), but I've changed them for consistency.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Kirill Bulatov [Mon, 26 Apr 2021 14:12:07 +0000 (17:12 +0300)]
Use -u instead of --utc date flag
bors[bot] [Mon, 26 Apr 2021 12:27:35 +0000 (12:27 +0000)]
Merge #8666
8666: fix: correct version string on windows and mac r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 26 Apr 2021 12:20:15 +0000 (15:20 +0300)]
fix: add date to the version string on Mac
It doesn't support `--iso`
Aleksey Kladov [Mon, 26 Apr 2021 12:17:02 +0000 (15:17 +0300)]
fix: dont' misundentify nightly as stable in --version on Mac&Win
We used to set `--nightly` in CI, and only for linux. Let's detect this
in xtask instead.