]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #8482
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>
3 years agoMerge with semantic style section
Daniel Franklin [Mon, 3 May 2021 16:54:09 +0000 (17:54 +0100)]
Merge with semantic style section

3 years agoMerge #8712
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>
3 years agoDon't mutate the tree while traversing in reorder_impl
Lukas Tobias Wirth [Mon, 3 May 2021 16:22:18 +0000 (18:22 +0200)]
Don't mutate the tree while traversing in reorder_impl

3 years agoMerge #8710
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>
3 years agofeat: build releases with lto=true
Aleksey Kladov [Mon, 3 May 2021 13:55:30 +0000 (16:55 +0300)]
feat: build releases with lto=true

closes #8050

3 years agoMerge #8427
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>
3 years agoMerge #8709
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>
3 years agocargo update
Jeremy Kolb [Sun, 2 May 2021 19:17:04 +0000 (15:17 -0400)]
cargo update

3 years agoMerge #8708
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>
3 years agofix: don't duplicate Progerss::Finised for cache priming
Aleksey Kladov [Sun, 2 May 2021 18:45:00 +0000 (21:45 +0300)]
fix: don't duplicate Progerss::Finised for cache priming

3 years agoMerge #8693
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>
3 years agoMerge #8701
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>
3 years agoFix feature description inconsistency
Brandon [Sat, 1 May 2021 02:47:41 +0000 (19:47 -0700)]
Fix feature description inconsistency

3 years agoMerge #8698
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>
3 years agofind_path: check only crate-level prelude
Jonas Schievink [Fri, 30 Apr 2021 16:41:18 +0000 (18:41 +0200)]
find_path: check only crate-level prelude

3 years agoEnsure that only one cache priming task can run at a time
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.

3 years agoMerge #8692
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>
3 years agoMerge #8695
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>
3 years agointernal: fix naming polarity
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.

3 years agointernal: normalize name
Aleksey Kladov [Fri, 30 Apr 2021 08:52:31 +0000 (11:52 +0300)]
internal: normalize name

All def types in hir are unsubstituted

3 years agoDon't look in super traits for <T as Trait>::Assoc
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.

3 years agoRewrite all_super_trait_refs as an iterator
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.

3 years agoHandle cycles in generic_defaults more gracefully
Florian Diebold [Thu, 29 Apr 2021 18:00:43 +0000 (20:00 +0200)]
Handle cycles in generic_defaults more gracefully

3 years agoAdd test for #8686
Florian Diebold [Thu, 29 Apr 2021 18:00:21 +0000 (20:00 +0200)]
Add test for #8686

3 years agoMerge #8687
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>
3 years agofix: closure unify without check ClosureId
Comonad [Thu, 29 Apr 2021 07:26:41 +0000 (15:26 +0800)]
fix: closure unify without check ClosureId

closes #8604

3 years agoMerge #8685
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>
3 years agoParse const param defaults
Jonas Schievink [Thu, 29 Apr 2021 01:07:53 +0000 (03:07 +0200)]
Parse const param defaults

3 years agoMerge #8684
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>
3 years agoCorrectly parse negated literals as const args
Jonas Schievink [Thu, 29 Apr 2021 00:16:22 +0000 (02:16 +0200)]
Correctly parse negated literals as const args

3 years agoMerge #8683
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>
3 years agointernal: ensure that client and server-side configs are not mixed up
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.

3 years agoMerge #8624
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>
3 years agoMerge #8629 #8657
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>
3 years agoMerge #8679
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>
3 years agofix: don't show error message for a valid notification
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

3 years agoMerge #8677
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>
3 years agoReturn ServerNotInitialized according to the spec
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

3 years agoMerge #8617
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>
3 years agoFix how and when old inlay hint decorations are disposed
Jorge Mederos Alvarado [Tue, 27 Apr 2021 00:26:36 +0000 (20:26 -0400)]
Fix how and when old inlay hint decorations are disposed

3 years agoAdd config options
Jorge Mederos Alvarado [Wed, 21 Apr 2021 21:14:17 +0000 (17:14 -0400)]
Add config options

3 years agoAdd option to opt out from smaller inlay hints font size
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

3 years agoadd option to package.json
Jorge Mederos Alvarado [Wed, 21 Apr 2021 19:09:41 +0000 (15:09 -0400)]
add option to package.json

3 years agoMerge #8671
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>
3 years agominor: simplify
Aleksey Kladov [Mon, 26 Apr 2021 16:30:50 +0000 (19:30 +0300)]
minor: simplify

3 years agoMerge #8670
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>
3 years agofix: make error message in the status bar more useful
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

3 years agoMerge #8668
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>
3 years agoUse -u instead of --utc date flag
Kirill Bulatov [Mon, 26 Apr 2021 14:12:07 +0000 (17:12 +0300)]
Use -u instead of --utc date flag

3 years agoMerge #8666
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>
3 years agofix: add date to the version string on Mac
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`

3 years agofix: dont' misundentify nightly as stable in --version on Mac&Win
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.

3 years agoMerge #8661
bors[bot] [Mon, 26 Apr 2021 10:49:40 +0000 (10:49 +0000)]
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>
3 years agoUpdate xtask/src/release.rs
Aleksey Kladov [Mon, 26 Apr 2021 10:49:19 +0000 (13:49 +0300)]
Update xtask/src/release.rs

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
3 years agoUpdate xtask/src/release.rs
Aleksey Kladov [Mon, 26 Apr 2021 10:49:14 +0000 (13:49 +0300)]
Update xtask/src/release.rs

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
3 years agointernal: make normal release after a poin release less annoying
Aleksey Kladov [Mon, 26 Apr 2021 10:41:34 +0000 (13:41 +0300)]
internal: make normal release after a poin release less annoying

3 years agoMerge #8660
bors[bot] [Mon, 26 Apr 2021 09:39:15 +0000 (09:39 +0000)]
Merge #8660

8660: Added `mutable` semantic token modifier for `&mut self` methods r=Veykril a=1c3t3a

This closes #8644.

Co-authored-by: Bastian Kersting <bastian@cmbt.de>
3 years agoFixed formatting
Bastian Kersting [Mon, 26 Apr 2021 09:37:28 +0000 (11:37 +0200)]
Fixed formatting

3 years agoAdded mutable semantic token modifier for &mut self methods
Bastian Kersting [Mon, 26 Apr 2021 07:22:36 +0000 (09:22 +0200)]
Added mutable semantic token modifier for &mut self methods

3 years agoMerge #8658
bors[bot] [Sun, 25 Apr 2021 21:18:57 +0000 (21:18 +0000)]
Merge #8658

8658: Check more carefully for cases where a rename can't be done r=Veykril a=dzhu

Attempting to rename an element of a tuple field would previously replace the type with the new name, which doesn't make sense; now it fails instead.

The check is done in both `prepare_rename` and `rename` so that the case is caught before the user is prompted for a new name. Some other existing failure cases are also now additionally checked in `prepare_rename`.

Closes: #8592
(I threw in some doc edits for a relevant type; of course, I can remove those if the policy here is to be strict about scope of changes within a PR.)

Co-authored-by: Danny Zhu <dzhu@dzhu.us>
3 years agoCheck more carefully for cases where a rename can't be done
Danny Zhu [Sun, 25 Apr 2021 20:28:38 +0000 (13:28 -0700)]
Check more carefully for cases where a rename can't be done

Attempting to rename an element of a tuple field would previously
replace the type with the new name, which doesn't make sense; now it
fails instead.

The check is done in both `prepare_rename` and `rename` so that the case
is caught before the user is prompted for a new name. Some other
existing failure cases are also now additionally checked in
`prepare_rename`.

3 years agonpm update
Jeremy Kolb [Sun, 25 Apr 2021 20:16:01 +0000 (16:16 -0400)]
npm update

3 years agoMerge #8656
bors[bot] [Sun, 25 Apr 2021 19:44:47 +0000 (19:44 +0000)]
Merge #8656

8656: Update deps r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
3 years agoUpdate deps
Jeremy Kolb [Sun, 25 Apr 2021 19:43:42 +0000 (15:43 -0400)]
Update deps

3 years agoMerge #8647
bors[bot] [Sat, 24 Apr 2021 11:39:50 +0000 (11:39 +0000)]
Merge #8647

8647: internal: Split out merge_imports module from helpers::insert_use r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSplit out merge_imports module from helpers::insert_use
Lukas Wirth [Sat, 24 Apr 2021 11:31:16 +0000 (13:31 +0200)]
Split out merge_imports module from helpers::insert_use

3 years agoMerge #8643
bors[bot] [Sat, 24 Apr 2021 10:37:42 +0000 (10:37 +0000)]
Merge #8643

8643: fix: correct version string to contain hash, build date and channel r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofix: correct version string to contain hash, build date and channel
Aleksey Kladov [Sat, 24 Apr 2021 10:36:45 +0000 (13:36 +0300)]
fix: correct version string to contain hash, build date and channel

3 years agominor
Aleksey Kladov [Sat, 24 Apr 2021 07:31:58 +0000 (10:31 +0300)]
minor

3 years agoMerge #8641
bors[bot] [Sat, 24 Apr 2021 06:09:21 +0000 (06:09 +0000)]
Merge #8641

8641: minor r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor
Aleksey Kladov [Sat, 24 Apr 2021 06:08:56 +0000 (09:08 +0300)]
minor

3 years agoMerge #8639
bors[bot] [Fri, 23 Apr 2021 19:09:37 +0000 (19:09 +0000)]
Merge #8639

8639: fix: 'configuration.property' error in VS Code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofix: 'configuration.property' error in VS Code
Aleksey Kladov [Fri, 23 Apr 2021 19:08:09 +0000 (22:08 +0300)]
fix: 'configuration.property' error in VS Code

closes #7789

3 years agoMerge #8591 #8638
bors[bot] [Fri, 23 Apr 2021 16:49:08 +0000 (16:49 +0000)]
Merge #8591 #8638

8591: Remove SyntaxRewriter usage in insert_use in favor of mutable syntax trees r=matklad a=Veykril

Unfortunately changing `insert_use` to not use `SyntaxRewriter` creates a lot of changes since so much relies on that. But on the other hand this should be the biggest usage of `SyntaxRewriter` I believe.

8638: Remove SyntaxRewriter::from_fn r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoRemove SyntaxRewriter::from_fn
Lukas Wirth [Fri, 23 Apr 2021 16:36:43 +0000 (18:36 +0200)]
Remove SyntaxRewriter::from_fn

3 years agoMerge #8637
bors[bot] [Fri, 23 Apr 2021 15:28:55 +0000 (15:28 +0000)]
Merge #8637

8637: Tag `yield` and `await` as ControlFlow in semantic highlighting r=Veykril a=Veykril

and shuffle some code around
Closes #8634
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSimplify highlight token match guards
Lukas Wirth [Fri, 23 Apr 2021 15:19:46 +0000 (17:19 +0200)]
Simplify highlight token match guards

3 years agoSort HlMod variants and ALL const
Lukas Wirth [Fri, 23 Apr 2021 14:57:03 +0000 (16:57 +0200)]
Sort HlMod variants and ALL const

3 years agoTag `yield` and `await` as ControlFlow in semantic highlighting
Lukas Wirth [Fri, 23 Apr 2021 14:43:48 +0000 (16:43 +0200)]
Tag `yield` and `await` as ControlFlow in semantic highlighting

3 years agoMerge #8317
bors[bot] [Fri, 23 Apr 2021 13:37:48 +0000 (13:37 +0000)]
Merge #8317

8317: Convert tuple struct to named struct assist r=Veykril a=unexge

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

Co-authored-by: unexge <unexge@gmail.com>
3 years agoAdd missing test case for "Convert to named struct" assist
unexge [Fri, 23 Apr 2021 13:18:10 +0000 (16:18 +0300)]
Add missing test case for "Convert to named struct" assist

3 years agoStop iterating reference after made an edit in "Convert to named struct" assist
unexge [Fri, 23 Apr 2021 10:08:07 +0000 (13:08 +0300)]
Stop iterating reference after made an edit in "Convert to named struct" assist

3 years agoSupport | as a surrounding pairs
Smittyvb [Thu, 22 Apr 2021 19:57:30 +0000 (15:57 -0400)]
Support | as a surrounding pairs

3 years agoMerge #8628
bors[bot] [Thu, 22 Apr 2021 18:48:53 +0000 (18:48 +0000)]
Merge #8628

8628: minor: Add one more profiling span to add_dep r=lnicola a=lnicola

CC #8623

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoAdd one more profiling span to add_dep
Laurențiu Nicola [Thu, 22 Apr 2021 18:48:17 +0000 (21:48 +0300)]
Add one more profiling span to add_dep

3 years agoMerge #8627
bors[bot] [Thu, 22 Apr 2021 18:26:09 +0000 (18:26 +0000)]
Merge #8627

8627: Add profiling spans under cargo_to_crate_graph r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoAdd profiling spans under cargo_to_crate_graph
Laurențiu Nicola [Thu, 22 Apr 2021 18:25:29 +0000 (21:25 +0300)]
Add profiling spans under cargo_to_crate_graph

3 years agoMerge #8605
bors[bot] [Thu, 22 Apr 2021 17:35:41 +0000 (17:35 +0000)]
Merge #8605

8605: internal: Automatically categorize the changelog entries r=matklad a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoUse explicit rustc commit-hash
vsrs [Thu, 22 Apr 2021 15:30:44 +0000 (18:30 +0300)]
Use explicit rustc commit-hash

Required for lldb on mac

3 years agoMerge #8620
bors[bot] [Thu, 22 Apr 2021 15:22:43 +0000 (15:22 +0000)]
Merge #8620

8620: Remove unnecessary braces for extracted block expression r=Veykril a=brandondong

This change addresses the first bullet point of https://github.com/rust-analyzer/rust-analyzer/issues/7839.

Specifically, when extracting block expressions, remove the unneeded extra braces inside the generated function.

Co-authored-by: Brandon <brandondong604@hotmail.com>
3 years agoAdd special `auto` value for `debug.sourceFileMap`
vsrs [Thu, 22 Apr 2021 13:09:46 +0000 (16:09 +0300)]
Add special `auto` value for `debug.sourceFileMap`

3 years agoAutodetect rust library source file map
vsrs [Thu, 22 Apr 2021 12:27:56 +0000 (15:27 +0300)]
Autodetect rust library source file map

3 years agoMove reference editing logic into own function to make error handling more ease in...
unexge [Thu, 22 Apr 2021 08:33:56 +0000 (11:33 +0300)]
Move reference editing logic into own function to make error handling more ease in "Convert to named struct" assist

3 years agoMerge #8621
bors[bot] [Thu, 22 Apr 2021 08:29:01 +0000 (08:29 +0000)]
Merge #8621

8621: feat: make sure nightly regressions don't break users r=lnicola a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofeat: make sure nightly regressions don't break users
Aleksey Kladov [Thu, 22 Apr 2021 08:15:20 +0000 (11:15 +0300)]
feat: make sure nightly regressions don't break users

3 years agoRemove unnecessary braces for extracted block expression
Brandon [Wed, 21 Apr 2021 06:41:17 +0000 (23:41 -0700)]
Remove unnecessary braces for extracted block expression

3 years agoMerge #8595
bors[bot] [Wed, 21 Apr 2021 23:54:47 +0000 (23:54 +0000)]
Merge #8595

8595: Diagnostic paths support specifying `remapPrefix` r=rickvanprim a=rickvanprim

Currently VSCode Problem Matchers will resolve a path like `//foo_crate/src/main.rs` if `${workspaceFolder}/foo_crate/src/main.rs` exists.  Presumably their behavior is functionally a string concatenation that would produce `${workspaceFolder///foo_crate/src/main.rs` and repeated path separators get ignored.

This PR attempts to mimic this behavior by stripping any `Component::RootDir` from `file_name` before joining it to `workspace_root`, and then checking if the file exists.  If it does, this path is used, and if not, the behavior falls through to the existing Rust path join behavior.

Co-authored-by: James Leitch <rickvanprim@gmail.com>
3 years agoDon't filter equal nodes in reorder assists
Lukas Wirth [Wed, 21 Apr 2021 22:54:31 +0000 (00:54 +0200)]
Don't filter equal nodes in reorder assists

3 years agoCode review feedback.
James Leitch [Wed, 21 Apr 2021 22:09:37 +0000 (15:09 -0700)]
Code review feedback.