]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoMerge #9620
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>
2 years agointernal: a bit more of cwd safety for flycheck
Aleksey Kladov [Sat, 17 Jul 2021 14:40:13 +0000 (17:40 +0300)]
internal: a bit more of cwd safety for flycheck

2 years agoMerge #9621
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>
2 years agoRemove outdated "(not yet released)" hint
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.

2 years agointernal: make sure that proc macro machinery doesn't depend on cwd
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

2 years agointernal: make it easier to isolate IO
Aleksey Kladov [Sat, 17 Jul 2021 13:43:33 +0000 (16:43 +0300)]
internal: make it easier to isolate IO

2 years agoMerge #9614
bors[bot] [Fri, 16 Jul 2021 13:48:23 +0000 (13:48 +0000)]
Merge #9614

9614: Parse input expressions for dbg! invocations in remove_dbg r=Veykril a=Veykril

Instead of inspecting the input tokentree manually, parse the input as `,` delimited expressions instead and act on that. This simplifies the assist quite a bit.

Fixes #8455

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoCleanup tests
Lukas Wirth [Fri, 16 Jul 2021 13:46:29 +0000 (15:46 +0200)]
Cleanup tests

2 years agoParse input expressions in for dbg! in remove_dbg
Lukas Wirth [Fri, 16 Jul 2021 13:20:50 +0000 (15:20 +0200)]
Parse input expressions in for dbg! in remove_dbg

2 years agoMerge #9611
bors[bot] [Thu, 15 Jul 2021 21:42:47 +0000 (21:42 +0000)]
Merge #9611

9611: minor: Explicitly connect an ambiguous import path case logic with its test r=SomeoneToIgnore a=SomeoneToIgnore

Follows up https://github.com/rust-analyzer/rust-analyzer/pull/8820/

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2 years agoExplicitly connect an ambiguous import path case logic with the test on it
Kirill Bulatov [Thu, 15 Jul 2021 21:41:00 +0000 (00:41 +0300)]
Explicitly connect an ambiguous import path case logic with the test on it

2 years agoMerge #9608
bors[bot] [Thu, 15 Jul 2021 20:24:22 +0000 (20:24 +0000)]
Merge #9608

9608: minor: Add regression test fo #7222 r=Veykril a=Veykril

Closes #7222
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoAdd regression test fo #7222
Lukas Wirth [Thu, 15 Jul 2021 20:23:34 +0000 (22:23 +0200)]
Add regression test fo #7222

2 years agoMerge #9607
bors[bot] [Thu, 15 Jul 2021 19:29:28 +0000 (19:29 +0000)]
Merge #9607

9607: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoSimplify
Lukas Wirth [Thu, 15 Jul 2021 19:28:30 +0000 (21:28 +0200)]
Simplify

2 years agoMerge #9605
bors[bot] [Thu, 15 Jul 2021 15:54:55 +0000 (15:54 +0000)]
Merge #9605

9605: internal: Folding ranges respect item visibilities r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFolding ranges respect item visibilities
Lukas Wirth [Thu, 15 Jul 2021 15:44:23 +0000 (17:44 +0200)]
Folding ranges respect item visibilities

2 years agoAdd nested region folding test
Lukas Wirth [Thu, 15 Jul 2021 15:02:45 +0000 (17:02 +0200)]
Add nested region folding test

2 years agoMerge #9604
bors[bot] [Thu, 15 Jul 2021 14:36:22 +0000 (14:36 +0000)]
Merge #9604

9604: fix: Don't fold consecutive modules with item lists r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoDon't fold consecutive modules with item lists
Lukas Wirth [Thu, 15 Jul 2021 14:35:31 +0000 (16:35 +0200)]
Don't fold consecutive modules with item lists

2 years agoMerge #9603
bors[bot] [Thu, 15 Jul 2021 14:27:57 +0000 (14:27 +0000)]
Merge #9603

9603: internal: Move attribute completion tests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMove attribute completion tests
Lukas Wirth [Thu, 15 Jul 2021 14:27:01 +0000 (16:27 +0200)]
Move attribute completion tests

2 years agoMerge #9600
bors[bot] [Thu, 15 Jul 2021 00:45:55 +0000 (00:45 +0000)]
Merge #9600

9600: fix: Single-line and nested blocks in the `unwrap_block` assist r=Veykril a=patrick-gu

Fixes #8411

Rework the system for stripping whitespace and braces in the unwrap_block assist to allow correct unwrapping of blocks such as:
```rust
{ $0 0 }
```
into
```rust
0
```

and nested blocks, such as:
```rust
$0{
    {
        3
    }
}
```
into
```rust
{
    3
}
```

This is done by creating the `update_expr_string_with_pat` function (along with `update_expr_string` and `update_expr_string_without_newline`), which strips whitespace and braces in a way that ensures that only whitespace and a maximum of one brace are removed from the start and end of the expression string.

I have also created several tests to ensure that this functionality works correctly.

Co-authored-by: patrick-gu <55641350+patrick-gu@users.noreply.github.com>
2 years agoMerge #9595
bors[bot] [Thu, 15 Jul 2021 00:20:44 +0000 (00:20 +0000)]
Merge #9595

9595: Show test mod runnable in outline modules r=Veykril a=Veykril

This shows a runnable inside outline test modules at the top of its file:
![image](https://user-images.githubusercontent.com/3757771/125494747-169c9238-3faa-4eed-9700-90bd730b4e3c.png)

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: Single-line and nested blocks in unwrap_block
patrick-gu [Wed, 14 Jul 2021 19:00:48 +0000 (12:00 -0700)]
fix: Single-line and nested blocks in unwrap_block

Rework the system for stripping whitespace and braces in the
unwrap_block assist to allow correct unwrapping of `{$0 { 0 } }`

2 years agoMerge #9599
bors[bot] [Wed, 14 Jul 2021 16:29:25 +0000 (16:29 +0000)]
Merge #9599

9599: Complete true and false keywords r=Veykril a=fabledpig

Closes #9521.

Co-authored-by: Levente Gyozo Lenart <leviiibog@gmail.com>
2 years agoUpdate tests
Levente Gyozo Lenart [Wed, 14 Jul 2021 16:16:18 +0000 (18:16 +0200)]
Update tests

2 years agoAdd true and false as completion suggestions when expecting an expression
Levente Gyozo Lenart [Wed, 14 Jul 2021 16:15:00 +0000 (18:15 +0200)]
Add true and false as completion suggestions when expecting an expression

2 years agoShow test mod runnable in outline modules
Lukas Wirth [Tue, 13 Jul 2021 16:55:06 +0000 (18:55 +0200)]
Show test mod runnable in outline modules

2 years agoMerge #9597
bors[bot] [Tue, 13 Jul 2021 23:43:01 +0000 (23:43 +0000)]
Merge #9597

9597: Use Type::walk for goto_type_definition r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoUse Type::walk for goto_type_definition
Lukas Wirth [Tue, 13 Jul 2021 23:42:30 +0000 (01:42 +0200)]
Use Type::walk for goto_type_definition

2 years agoMerge #9596
bors[bot] [Tue, 13 Jul 2021 17:25:00 +0000 (17:25 +0000)]
Merge #9596

9596: Return type arguments in goto_type_definition result  r=Veykril a=Veykril

Fixes #9586
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoReturn type arguments in goto_type_definition result
Lukas Wirth [Tue, 13 Jul 2021 17:22:44 +0000 (19:22 +0200)]
Return type arguments in goto_type_definition result

2 years agoMerge #9594
bors[bot] [Tue, 13 Jul 2021 16:57:19 +0000 (16:57 +0000)]
Merge #9594

9594: Assign mutable semantic token modifier to assignment operators r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9578

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoAssign mutable semantic token modifier to assignment operators
Lukas Wirth [Tue, 13 Jul 2021 16:32:02 +0000 (18:32 +0200)]
Assign mutable semantic token modifier to assignment operators

2 years agoMerge #9592
bors[bot] [Tue, 13 Jul 2021 16:30:52 +0000 (16:30 +0000)]
Merge #9592

9592: internal: Split main highlighting function up into a few subfunctions  r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoSplit main highlighting function up into a few subfunctions
Lukas Wirth [Tue, 13 Jul 2021 16:21:20 +0000 (18:21 +0200)]
Split main highlighting function up into a few subfunctions

2 years agoMerge #9588
bors[bot] [Tue, 13 Jul 2021 12:02:52 +0000 (12:02 +0000)]
Merge #9588

9588: minor: make sure that project_root works correctly r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: make sure that project_root works correctly
Aleksey Kladov [Tue, 13 Jul 2021 12:02:29 +0000 (15:02 +0300)]
minor: make sure that project_root works correctly

2 years agoMerge #9585
bors[bot] [Tue, 13 Jul 2021 10:43:01 +0000 (10:43 +0000)]
Merge #9585

9585: Rename the old server before update r=matklad a=lnicola

Kinda' fixes #6602

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoMerge #9550
bors[bot] [Tue, 13 Jul 2021 10:35:20 +0000 (10:35 +0000)]
Merge #9550

9550: Proc macro multi abi proof of concept r=matklad a=alexjg

#8925 was irritating me so I thought I would have a bash at fixing it. What I've done here is copy the `crates/proc_macro_srv/src/proc_macro` code (which is copied from `<RUST>/library/proc_macro`) to `crates/proc_macro_srv/src/proc_macro_nightly` and the modified the nightly version to include the changes from https://github.com/rust-analyzer/rust-analyzer/pull/9047 and https://github.com/yotamofek/rust-analyzer/commit/aeb7b183a2302af968f1110fb3cbd00c76a34974

This gives us the code to support both stable and nightly ABIs. Then we use the `proc_macro_api::version::read_dylib_info` to determine which version of the ABI to load when creating a `ProcMacroLibraryLibLoading` (which is now an enum).

This seems to work for me.  The code could be cleaned up but I wanted to see if the approach makes sense before I spend more time on it.

I've split the change into two commits, the first is just copying and modifying the `proc_macro` crate, the second contains most of the interesting work around figuring out which ABI to use.

Co-authored-by: Alex Good <alex@memoryandthought.me>
Co-authored-by: alexjg <alex@memoryandthought.me>
2 years agoRename the old server before update
Laurențiu Nicola [Mon, 12 Jul 2021 19:09:01 +0000 (22:09 +0300)]
Rename the old server before update

3 years agoMerge #9583
bors[bot] [Mon, 12 Jul 2021 18:15:45 +0000 (18:15 +0000)]
Merge #9583

9583: internal: get rid of a call to slow O(N) visibility_of function r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: get rid of a call to slow O(N) visibility_of function
Aleksey Kladov [Mon, 12 Jul 2021 18:13:43 +0000 (21:13 +0300)]
internal: get rid of a call to slow O(N) visibility_of function

Instead of inferring module's declared visibility by looking at the
scope of its parent, let's just remeber the declared visibility in the
DefMap.

3 years agoMerge #9582
bors[bot] [Mon, 12 Jul 2021 17:18:43 +0000 (17:18 +0000)]
Merge #9582

9582: internal: remove erroneous default impl r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: remove erroneous default impl
Aleksey Kladov [Mon, 12 Jul 2021 17:14:58 +0000 (20:14 +0300)]
internal: remove erroneous default impl

3 years agointernal: remove deprecated fn
Aleksey Kladov [Mon, 12 Jul 2021 17:04:41 +0000 (20:04 +0300)]
internal: remove deprecated fn

3 years agointernal: perpare to remove ModuleData::default
Aleksey Kladov [Mon, 12 Jul 2021 17:02:56 +0000 (20:02 +0300)]
internal: perpare to remove ModuleData::default

3 years agointernal: remove erroneous Default impl for ModuleOrigin
Aleksey Kladov [Mon, 12 Jul 2021 17:00:17 +0000 (20:00 +0300)]
internal: remove erroneous Default impl for ModuleOrigin

In rust-analyzer, we avoid defualt impls for types which don't have
sensible, "empty" defaults. In particular, we avoid using invalid
indices for defaults and similar hacks.

3 years agoIntroduce proc_macro_srv::abis, impl 1.47 and 1.55
Alex Good [Mon, 12 Jul 2021 14:47:47 +0000 (15:47 +0100)]
Introduce proc_macro_srv::abis, impl 1.47 and 1.55

Rather than a "Stable" and "Nightly" ABI we instead name ABIs based on
the version of the rust compiler in which they were introduced. We place
these ABIs in a new module - `proc_macro_srv::abis` - where we also add
some mchinery to abstract over ABIs. This should make it easy to add new
ABIs at a later date as the rust compiler evolves.

3 years agocheck rustc major version == 1 not < 1
alexjg [Sat, 10 Jul 2021 16:07:12 +0000 (17:07 +0100)]
check rustc major version == 1 not < 1

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
3 years agoUse rustc version of dylib to choose which proc macro ABI to use
Alex Good [Sat, 10 Jul 2021 14:12:41 +0000 (15:12 +0100)]
Use rustc version of dylib to choose which proc macro ABI to use

3 years agocopy proc_maco to proc_macro_nightly and modify for nightly ABI compatibility
Alex Good [Sat, 10 Jul 2021 14:11:17 +0000 (15:11 +0100)]
copy proc_maco to proc_macro_nightly and modify for nightly ABI compatibility

3 years agoMerge #9179
bors[bot] [Mon, 12 Jul 2021 14:45:48 +0000 (14:45 +0000)]
Merge #9179

9179: Update npm deps r=matklad a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoMerge #9579
bors[bot] [Mon, 12 Jul 2021 13:37:12 +0000 (13:37 +0000)]
Merge #9579

9579: fix: Set more `CARGO_` env vars r=jonas-schievink a=jonas-schievink

Set `CARGO_CRATE_NAME` to the package name, with `-` replaced by `_`. This is wrong, but better than not setting the variable at all.

Also set `CARGO_PKG_HOMEPAGE` since it's easy.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoSet more `CARGO_` env vars
Jonas Schievink [Mon, 12 Jul 2021 13:34:49 +0000 (15:34 +0200)]
Set more `CARGO_` env vars

3 years agoMerge #9535
bors[bot] [Mon, 12 Jul 2021 13:23:26 +0000 (13:23 +0000)]
Merge #9535

9535: internal: remove proc macro management thread r=jonas-schievink a=jonas-schievink

Communication with the proc macro server process has always happened one request at a time, so the additional thread isn't really needed (it just forwarded each request, and sent back the response). This removes some indirection that was a bit hard to understand (a channel was allocated and sent over another channel to return the response).

Hope I'm not missing anything here

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAddress review comments
Jonas Schievink [Mon, 12 Jul 2021 13:19:53 +0000 (15:19 +0200)]
Address review comments

3 years agoMerge #9569
bors[bot] [Sun, 11 Jul 2021 14:28:08 +0000 (14:28 +0000)]
Merge #9569

9569: internal: Explicitly check for reference locals or fields in Name classification r=Veykril a=Veykril

Closes #7524
Inlines all the calls to reference related name classification as well as emits both goto definition targets for field shorthands.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #9572
bors[bot] [Sun, 11 Jul 2021 14:19:25 +0000 (14:19 +0000)]
Merge #9572

9572: fix: Work around older synstructure derives r=lnicola a=flodiebold

Fixes #9562, until the proper fix rust-lang/chalk#717 works which requires mystor/synstructure#47 to be released.

Also add an unrelated test, for #9560.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoReturn both field and local references for shorthands in goto_def
Lukas Wirth [Sun, 11 Jul 2021 14:16:16 +0000 (16:16 +0200)]
Return both field and local references for shorthands in goto_def

3 years agoAdd test for #9560
Florian Diebold [Sun, 11 Jul 2021 14:14:22 +0000 (16:14 +0200)]
Add test for #9560

3 years agoAdd workaround for #9562
Florian Diebold [Sun, 11 Jul 2021 11:22:11 +0000 (13:22 +0200)]
Add workaround for #9562

This treats the consts generated by older synstructure versions like
unnamed consts. We should remove this at some point (at least after
Chalk has switched).

3 years agoInline name classification reference calls
Lukas Wirth [Sun, 11 Jul 2021 13:39:09 +0000 (15:39 +0200)]
Inline name classification reference calls

3 years agoExplicitly check for reference locals or fields in Name classification
Lukas Wirth [Sun, 11 Jul 2021 12:03:35 +0000 (14:03 +0200)]
Explicitly check for reference locals or fields in Name classification

3 years agoMerge #9567 #9568
bors[bot] [Sun, 11 Jul 2021 12:51:33 +0000 (12:51 +0000)]
Merge #9567 #9568

9567: remove unneded special case r=matklad a=matklad

bors r+
🤖

9568: feat: add 'for' postfix completion r=lnicola a=mahdi-frms

![Peek 2021-07-11 16-45](https://user-images.githubusercontent.com/62165556/125194692-a0aaf780-e267-11eb-952a-81de7955d9a1.gif)

adds #9561

used ```ele``` as identifier for each element in the iteration

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: mahdi-frms <mahdif1380@outlook.com>
3 years agointernal: remove one more needless extern crate
Aleksey Kladov [Sun, 11 Jul 2021 12:48:49 +0000 (15:48 +0300)]
internal: remove one more needless extern crate

3 years agoMerge #9570
bors[bot] [Sun, 11 Jul 2021 12:44:31 +0000 (12:44 +0000)]
Merge #9570

9570: minor: Simplify Semantics::type_of_expr_with_coercion r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSimplify Semantics::type_of_expr_with_coercion
Lukas Wirth [Sun, 11 Jul 2021 12:43:05 +0000 (14:43 +0200)]
Simplify Semantics::type_of_expr_with_coercion

3 years agoadd 'for' postfix completion
mahdi-frms [Sun, 11 Jul 2021 11:58:02 +0000 (16:28 +0430)]
add 'for' postfix completion

3 years agotypo
Aleksey Kladov [Sun, 11 Jul 2021 12:13:42 +0000 (15:13 +0300)]
typo

3 years agointernal: remove unused param
Aleksey Kladov [Sun, 11 Jul 2021 12:07:32 +0000 (15:07 +0300)]
internal: remove unused param

3 years agointernal: add a test for broken refactor
Aleksey Kladov [Sun, 11 Jul 2021 12:05:16 +0000 (15:05 +0300)]
internal: add a test for broken refactor

3 years agointernal: remove needless distinction between a carte and its root mod
Aleksey Kladov [Sun, 11 Jul 2021 11:55:24 +0000 (14:55 +0300)]
internal: remove needless distinction between a carte and its root mod

3 years agoMerge #9565
bors[bot] [Sun, 11 Jul 2021 11:41:51 +0000 (11:41 +0000)]
Merge #9565

9565: internal: document NameClass and NameRefClass r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: document NameClass and NameRefClass
Aleksey Kladov [Sun, 11 Jul 2021 11:39:25 +0000 (14:39 +0300)]
internal: document NameClass and NameRefClass

3 years agoMerge #9563
bors[bot] [Sun, 11 Jul 2021 11:07:56 +0000 (11:07 +0000)]
Merge #9563

9563: internal: move some presentation-specific concerns out of IDE crate r=Veykril a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoupdate tests
Aleksey Kladov [Sun, 11 Jul 2021 10:55:00 +0000 (13:55 +0300)]
update tests

3 years agodrop unused fields
Aleksey Kladov [Sun, 11 Jul 2021 10:51:52 +0000 (13:51 +0300)]
drop unused fields

3 years agosimplify
Aleksey Kladov [Sun, 11 Jul 2021 10:49:38 +0000 (13:49 +0300)]
simplify

3 years agodrop unused field
Aleksey Kladov [Sun, 11 Jul 2021 10:48:26 +0000 (13:48 +0300)]
drop unused field

3 years agosimplify
Aleksey Kladov [Sun, 11 Jul 2021 10:45:58 +0000 (13:45 +0300)]
simplify

3 years agobe explicit about what we *can't* debug
Aleksey Kladov [Sun, 11 Jul 2021 10:44:28 +0000 (13:44 +0300)]
be explicit about what we *can't* debug

3 years agobetter name
Aleksey Kladov [Sun, 11 Jul 2021 10:43:43 +0000 (13:43 +0300)]
better name

3 years agoLet the client care about presentation
Aleksey Kladov [Sun, 11 Jul 2021 10:42:19 +0000 (13:42 +0300)]
Let the client care about presentation

3 years agoprepare to move run/debug splitting to handlers
Aleksey Kladov [Sun, 11 Jul 2021 10:34:22 +0000 (13:34 +0300)]
prepare to move run/debug splitting to handlers

3 years agoMerge #9449
bors[bot] [Sun, 11 Jul 2021 09:37:33 +0000 (09:37 +0000)]
Merge #9449

9449: feat: Emit test names in `Run test` runnables if they come from a macro expansion r=matklad a=Veykril

Fixes #8964
Before:
![Code_D1Tu5Iuh5I](https://user-images.githubusercontent.com/3757771/124174685-f552b380-daac-11eb-9086-c97db014b77c.png)
After:
![image](https://user-images.githubusercontent.com/3757771/124174493-bb81ad00-daac-11eb-96c7-3de6545a62e1.png)

Basically when a macro emits more than one test we name the test functions/modules name in the runnable instead to not emit a bunch of equally named `Run Test` annotations which don't really tell much.

Note that the `Run fibonacci_test Tests` line is below the attributes due to the fact that the function name span is being reused for the generated module in rstest's expansion.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #9557
bors[bot] [Sat, 10 Jul 2021 17:25:16 +0000 (17:25 +0000)]
Merge #9557

9557: fix: Respect coercions in `inline_call` r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoRespect coercions in `inline_call`
Lukas Wirth [Sat, 10 Jul 2021 17:16:32 +0000 (19:16 +0200)]
Respect coercions in `inline_call`

3 years agoExpose coercions for patterns and expressions in semantics
Lukas Wirth [Sat, 10 Jul 2021 17:03:46 +0000 (19:03 +0200)]
Expose coercions for patterns and expressions in semantics

3 years agoMerge #9552
bors[bot] [Sat, 10 Jul 2021 16:25:58 +0000 (16:25 +0000)]
Merge #9552

9552: internal: `add_explicit_type` respects coercions r=Veykril a=Veykril

or so I'd like to say but there is one odd case here where it doesn't work(see [review](https://github.com/rust-analyzer/rust-analyzer/pull/9552#discussion_r667351856))

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6107

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years ago`add_explicit_type` respects coercions
Lukas Wirth [Sat, 10 Jul 2021 16:19:46 +0000 (18:19 +0200)]
`add_explicit_type` respects coercions

3 years agoResolve type adjustments
Lukas Wirth [Sat, 10 Jul 2021 16:19:23 +0000 (18:19 +0200)]
Resolve type adjustments

3 years agoMerge #9553
bors[bot] [Sat, 10 Jul 2021 16:07:01 +0000 (16:07 +0000)]
Merge #9553

9553: minor: Disambiguate replace with if let assist labels r=Veykril a=Veykril

Turns out we have two assists for replacing something with `if let` constructs, so having the cursor on a `let` keyword inside a match gave you two identical assist labels which is rather confusing.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDisambiguate replace with if let assist labels
Lukas Wirth [Sat, 10 Jul 2021 15:41:25 +0000 (17:41 +0200)]
Disambiguate replace with if let assist labels

3 years agoMerge #9555 #9556
bors[bot] [Sat, 10 Jul 2021 15:59:26 +0000 (15:59 +0000)]
Merge #9555 #9556

9555: feat: Enable `auto_import` on ident patterns r=Veykril a=Veykril

Helpful for when you want to import a type in a pattern right before destructuring it.

9556: Bump deps r=lnicola a=lnicola

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoBump chalk
Laurențiu Nicola [Sat, 10 Jul 2021 15:56:56 +0000 (18:56 +0300)]
Bump chalk

3 years agoBump rustc_lexer a little
Laurențiu Nicola [Sat, 10 Jul 2021 15:51:35 +0000 (18:51 +0300)]
Bump rustc_lexer a little

3 years agoEnable `auto_import` on ident patterns
Lukas Wirth [Sat, 10 Jul 2021 15:57:33 +0000 (17:57 +0200)]
Enable `auto_import` on ident patterns

3 years agoBump deps
Laurențiu Nicola [Sat, 10 Jul 2021 15:38:41 +0000 (18:38 +0300)]
Bump deps