Commit graph

16718 commits

Author SHA1 Message Date
bors[bot]
242fa3c15b
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>
2021-05-03 13:37:12 +00:00
bors[bot]
eb741e895f
Merge #8709
8709: cargo update r=kjeremy a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2021-05-02 19:18:18 +00:00
Jeremy Kolb
666302f007 cargo update 2021-05-02 15:17:04 -04:00
bors[bot]
a319e939b4
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>
2021-05-02 18:45:22 +00:00
Aleksey Kladov
cd69307aee fix: don't duplicate Progerss::Finised for cache priming 2021-05-02 21:45:00 +03:00
bors[bot]
548c18c062
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>
2021-05-02 18:34:29 +00:00
bors[bot]
e1bef53109
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>
2021-05-01 09:15:54 +00:00
Brandon
43c79a35a8 Fix feature description inconsistency 2021-04-30 19:47:41 -07:00
bors[bot]
6b2b6c1b57
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>
2021-04-30 16:42:24 +00:00
Jonas Schievink
6873920c4f find_path: check only crate-level prelude 2021-04-30 18:41:18 +02:00
Boris-Chengbiao Zhou
ce8c6c4762 Ensure that only one cache priming task can run at a time
Fixes #8632.
2021-04-30 16:48:11 +02:00
bors[bot]
b5b4a1f23d
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>
2021-04-30 09:07:24 +00:00
bors[bot]
6ea91a419f
Merge #8695
8695: internal: fix naming polarity r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-30 08:57:17 +00:00
Aleksey Kladov
1a01a5ae19 internal: fix naming polarity
Type Constructors have *parameters*, when they are substituted with type
*arguments*, we have a type.
2021-04-30 11:55:59 +03:00
Aleksey Kladov
cb3ef552e8 internal: normalize name
All def types in hir are unsubstituted
2021-04-30 11:52:31 +03:00
Florian Diebold
c2aefd5b95 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.
2021-04-29 20:23:02 +02:00
Florian Diebold
2d20ab7eaf 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.
2021-04-29 20:18:41 +02:00
Florian Diebold
b384cfcb81 Handle cycles in generic_defaults more gracefully 2021-04-29 20:00:43 +02:00
Florian Diebold
184a0d7c1e Add test for #8686 2021-04-29 20:00:21 +02:00
bors[bot]
80bee14e14
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>
2021-04-29 07:45:37 +00:00
Comonad
78f1583bdd fix: closure unify without check ClosureId
closes #8604
2021-04-29 15:26:41 +08:00
bors[bot]
dce0d71b18
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>
2021-04-29 01:09:37 +00:00
Jonas Schievink
cb8632d87c Parse const param defaults 2021-04-29 03:07:53 +02:00
bors[bot]
9d199486da
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>
2021-04-29 00:28:27 +00:00
Jonas Schievink
caee3a2eeb Correctly parse negated literals as const args 2021-04-29 02:27:55 +02:00
bors[bot]
49b219b103
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>
2021-04-28 10:13:52 +00:00
Aleksey Kladov
5c1a901035 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.
2021-04-28 13:13:30 +03:00
bors[bot]
fb45d2adec
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>
2021-04-27 20:41:35 +00:00
bors[bot]
e2b87735cc
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>
2021-04-27 13:22:09 +00:00
bors[bot]
86b5084917
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>
2021-04-27 13:10:22 +00:00
Aleksey Kladov
f45c1ffc5b fix: don't show error message for a valid notification
Closes #6782, #6772
2021-04-27 16:09:59 +03:00
bors[bot]
ef7253c6df
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>
2021-04-27 11:51:03 +00:00
Jeremy Kolb
36c20dc23d 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
2021-04-27 07:47:06 -04:00
bors[bot]
4af50de0ab
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>
2021-04-27 08:31:35 +00:00
Jorge Mederos Alvarado
0230f22d2a Fix how and when old inlay hint decorations are disposed 2021-04-26 20:29:54 -04:00
Jorge Mederos Alvarado
c4dba4077f Add config options 2021-04-26 20:29:54 -04:00
Jorge Mederos Alvarado
9e5ef0ce72 Add option to opt out from smaller inlay hints font size 2021-04-26 20:29:54 -04:00
Jorge Mederos Alvarado
a2ba0f4846 add option to package.json 2021-04-26 20:29:54 -04:00
bors[bot]
c5364ffde1
Merge #8671
8671: minor: simplify r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-26 16:31:19 +00:00
Aleksey Kladov
f06e4b8e74 minor: simplify 2021-04-26 19:30:50 +03:00
bors[bot]
7e10df9df9
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>
2021-04-26 16:18:02 +00:00
Aleksey Kladov
363cef5c0e 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
2021-04-26 19:16:07 +03:00
bors[bot]
6cd669e880
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>
2021-04-26 14:17:05 +00:00
Kirill Bulatov
c24bdab97e Use -u instead of --utc date flag 2021-04-26 17:12:13 +03:00
bors[bot]
eee50b6921
Merge #8666
8666: fix: correct version string on windows and mac r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-26 12:27:35 +00:00
Aleksey Kladov
4f9640ff39 fix: add date to the version string on Mac
It doesn't support `--iso`
2021-04-26 15:20:15 +03:00
Aleksey Kladov
869ec5f97a 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.
2021-04-26 15:17:02 +03:00
bors[bot]
691c96e36a
Merge #8661
8661: internal: make normal release after a poin release less annoying r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-26 10:49:40 +00:00
Aleksey Kladov
26dfb6b9d0
Update xtask/src/release.rs
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-04-26 13:49:19 +03:00
Aleksey Kladov
1745207a08
Update xtask/src/release.rs
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-04-26 13:49:14 +03:00