]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRemove proc macro management thread
Jonas Schievink [Thu, 8 Jul 2021 14:40:14 +0000 (16:40 +0200)]
Remove proc macro management thread

3 years agoMerge #9534
bors[bot] [Thu, 8 Jul 2021 14:19:06 +0000 (14:19 +0000)]
Merge #9534

9534: minor: one more usless type r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: one more usless type
Aleksey Kladov [Thu, 8 Jul 2021 14:18:44 +0000 (17:18 +0300)]
minor: one more usless type

3 years agoMerge #9533
bors[bot] [Thu, 8 Jul 2021 13:51:27 +0000 (13:51 +0000)]
Merge #9533

9533: minor: Update list of safe intrinsics r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUpdate list of safe intrinsics
Lukas Wirth [Thu, 8 Jul 2021 13:49:39 +0000 (15:49 +0200)]
Update list of safe intrinsics

3 years agoMerge #9532
bors[bot] [Thu, 8 Jul 2021 13:05:54 +0000 (13:05 +0000)]
Merge #9532

9532: Shorten thread names r=lnicola a=weirdsmiley

Threads on Linux have an upper limit of 16 characters, hence dropping `Thread` from their names.

Co-authored-by: Manas <manas18244@iiitd.ac.in>
3 years agoThis patch shortens the spawned threads' names, as threads on Linux
Manas [Thu, 8 Jul 2021 12:39:41 +0000 (18:09 +0530)]
This patch shortens the spawned threads' names, as threads on Linux
have an upper limit of 16 characters for their names.

3 years agoMerge #9529
bors[bot] [Thu, 8 Jul 2021 09:55:27 +0000 (09:55 +0000)]
Merge #9529

9529: fix: Don't unify arrays with their elements r=flodiebold a=lnicola

Addresses https://github.com/rust-analyzer/rust-analyzer/pull/9526#issuecomment-876206100.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoDon't unify array elements with their arrays
Laurențiu Nicola [Thu, 8 Jul 2021 08:22:29 +0000 (11:22 +0300)]
Don't unify array elements with their arrays

3 years agoMerge #9526
bors[bot] [Wed, 7 Jul 2021 22:13:35 +0000 (22:13 +0000)]
Merge #9526

9526: fix: coerce array elements to a common type r=flodiebold a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoImplement LUB coercion of array elements
Jonas Schievink [Wed, 7 Jul 2021 20:50:20 +0000 (22:50 +0200)]
Implement LUB coercion of array elements

3 years agoMerge #9519
bors[bot] [Wed, 7 Jul 2021 20:10:20 +0000 (20:10 +0000)]
Merge #9519

9519: Explicitly name all spawned threads r=weirdsmiley a=weirdsmiley

Fixes: [#9385](https://github.com/rust-analyzer/rust-analyzer/issues/9385)
The thread name is shown in debugger as well as panic messages and this
patch makes it easier to follow a thread instead of looking through
full backtrace, by naming all spawned threads according to their
functioning.

Co-authored-by: Manas <manas18244@iiitd.ac.in>
3 years agoExplicitly name all spawned threads
Manas [Wed, 7 Jul 2021 16:48:36 +0000 (22:18 +0530)]
Explicitly name all spawned threads

The thread name is shown in debugger as well as panic messages and this
patch makes it easier to follow a thread instead of looking through
full backtrace, by naming all spawned threads according to their
functioning.

3 years agoMerge #9524
bors[bot] [Wed, 7 Jul 2021 17:55:58 +0000 (17:55 +0000)]
Merge #9524

9524: minor: Add test for trait completion label edit r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd test for trait completion label edit
Lukas Wirth [Wed, 7 Jul 2021 17:54:58 +0000 (19:54 +0200)]
Add test for trait completion label edit

3 years agoMerge #9523
bors[bot] [Wed, 7 Jul 2021 17:42:55 +0000 (17:42 +0000)]
Merge #9523

9523: fix: Don't add the trait name to the insert text in completions r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't add the trait name to the insert text in completions
Lukas Wirth [Wed, 7 Jul 2021 17:42:09 +0000 (19:42 +0200)]
Don't add the trait name to the insert text in completions

3 years agoMerge #9520
bors[bot] [Wed, 7 Jul 2021 17:09:54 +0000 (17:09 +0000)]
Merge #9520

9520: internal: Complete `crate`, `super` and `self` in non-UseTree paths r=Veykril a=Veykril

Fixes #9311
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoComplete `crate`, `super` and `self` in non-usetree paths
Lukas Wirth [Wed, 7 Jul 2021 17:08:37 +0000 (19:08 +0200)]
Complete `crate`, `super` and `self` in non-usetree paths

3 years agoMerge #9517
bors[bot] [Wed, 7 Jul 2021 15:07:33 +0000 (15:07 +0000)]
Merge #9517

9517: minor: Add nightly proc macro issue to the bug report template r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoAdd nightly proc macro issue to the bug report template
Laurențiu Nicola [Wed, 7 Jul 2021 15:05:00 +0000 (18:05 +0300)]
Add nightly proc macro issue to the bug report template

3 years agoMerge #9417
bors[bot] [Wed, 7 Jul 2021 14:54:01 +0000 (14:54 +0000)]
Merge #9417

9417: Update bug_report template r=flodiebold a=sasurau4

Fix #9386

Remove all resolved issues

Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
3 years agoMerge #9514
bors[bot] [Tue, 6 Jul 2021 18:31:51 +0000 (18:31 +0000)]
Merge #9514

9514: internal: Invert boolean literals in assist negation logic r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoInvert boolean literals in assist negation logic
Lukas Wirth [Tue, 6 Jul 2021 18:30:26 +0000 (20:30 +0200)]
Invert boolean literals in assist negation logic

3 years agoMerge #9500
bors[bot] [Tue, 6 Jul 2021 16:20:54 +0000 (16:20 +0000)]
Merge #9500

9500: internal: Only inline closure, literal and local arguments when used once r=Veykril a=Veykril

See https://github.com/rust-analyzer/rust-analyzer/pull/9474#discussion_r663881507 for reasoning.

This still inlines single use closures and literals as naming these is usually not as useful. Prime examples being the Option/Result consuming functions like `map_or` etc.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #9505
bors[bot] [Mon, 5 Jul 2021 21:02:42 +0000 (21:02 +0000)]
Merge #9505

9505: internal: ensure consistent passing for config params r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: ensure consistent passing for config params
Aleksey Kladov [Mon, 5 Jul 2021 21:00:39 +0000 (00:00 +0300)]
internal: ensure consistent passing for config params

We pass "context" parametes first, so configs should be on the left.
"Bigger" context wins, so configs goes after db.

3 years agoMerge #9503
bors[bot] [Mon, 5 Jul 2021 20:48:10 +0000 (20:48 +0000)]
Merge #9503

9503: feat: make join lines behavior configurable r=matklad a=matklad

![join_config](https://user-images.githubusercontent.com/1711539/124515923-4504e800-dde9-11eb-8d58-d97945a1a785.gif)

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofeat: make join lines behavior configurable
Aleksey Kladov [Mon, 5 Jul 2021 20:31:44 +0000 (23:31 +0300)]
feat: make join lines behavior configurable

closes #9492

3 years agoMerge #9496
bors[bot] [Mon, 5 Jul 2021 17:11:09 +0000 (17:11 +0000)]
Merge #9496

9496: fix: make the logs line buffered r=lnicola a=mahdi-frms

fixes #9432
Not quite sure if that's what you want, but storing the log message in buffers eliminated the tiny write syscalls for me.
I just changed the Logger struct.

Co-authored-by: mahdi-frms <mahdif1380@outlook.com>
3 years agorefactor logger flushing
mahdi-frms [Mon, 5 Jul 2021 16:22:34 +0000 (20:52 +0430)]
refactor logger flushing

3 years agomake the logs line buffered
mahdi-frms [Mon, 5 Jul 2021 15:16:09 +0000 (19:46 +0430)]
make the logs line buffered

3 years agoMerge #9501
bors[bot] [Mon, 5 Jul 2021 15:06:55 +0000 (15:06 +0000)]
Merge #9501

9501: internal: Add a coverage mark r=jonas-schievink a=jonas-schievink

https://github.com/rust-analyzer/rust-analyzer/pull/9499#discussion_r663966671

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd a coverage mark
Jonas Schievink [Mon, 5 Jul 2021 15:06:16 +0000 (17:06 +0200)]
Add a coverage mark

3 years agoOnly inline closure, literal and local arguments when used once
Lukas Wirth [Mon, 5 Jul 2021 14:33:45 +0000 (16:33 +0200)]
Only inline closure, literal and local arguments when used once

3 years agoMerge #9498
bors[bot] [Mon, 5 Jul 2021 14:24:41 +0000 (14:24 +0000)]
Merge #9498

9498: feat: Yeet `replace_unwrap_with_match` in favor of `inline_call` r=Veykril a=Veykril

`inline_call` can basically do this job now and more.
![r92csxeBQW](https://user-images.githubusercontent.com/3757771/124482574-b58c1480-dda9-11eb-940d-bc6a2fe4050b.gif)

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #9499
bors[bot] [Mon, 5 Jul 2021 14:08:54 +0000 (14:08 +0000)]
Merge #9499

9499: fix: Fix cycle in visibility computation with modules from the same block r=jonas-schievink a=jonas-schievink

fixes https://github.com/rust-analyzer/rust-analyzer/issues/9481

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix visibility computation with modules from the same block
Jonas Schievink [Mon, 5 Jul 2021 14:06:50 +0000 (16:06 +0200)]
Fix visibility computation with modules from the same block

3 years agoYeet `replace_unwrap_with_match` in favor of `inline_call`
Lukas Wirth [Mon, 5 Jul 2021 13:47:55 +0000 (15:47 +0200)]
Yeet `replace_unwrap_with_match` in favor of `inline_call`

3 years agoMerge #9497
bors[bot] [Mon, 5 Jul 2021 13:42:37 +0000 (13:42 +0000)]
Merge #9497

9497: Wrap inlined closures in parens when inlined in an expression in `inline_call` r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoWrap inlined closures in parens when inlined in an expression in `inline_call`
Lukas Wirth [Mon, 5 Jul 2021 13:34:01 +0000 (15:34 +0200)]
Wrap inlined closures in parens when inlined in an expression in `inline_call`

3 years agoMerge #9494
bors[bot] [Mon, 5 Jul 2021 12:40:02 +0000 (12:40 +0000)]
Merge #9494

9494: feat: show 'as' or 'use' before label traits r=matklad a=mahdi-frms

based on #9478 discussions: showing 'as' before already imported traits and 'use' on auto-import cased

![Screenshot from 2021-07-05 16-54-59](https://user-images.githubusercontent.com/62165556/124471905-b5dcdd80-ddb2-11eb-8852-1d703ef6023f.png)

![Screenshot from 2021-07-05 16-55-20](https://user-images.githubusercontent.com/62165556/124471923-bffedc00-ddb2-11eb-9571-31b8b95499f1.png)

Co-authored-by: mahdi-frms <mahdif1380@outlook.com>
3 years agoUpdate `inline_call` assist doc example
Lukas Wirth [Mon, 5 Jul 2021 12:24:25 +0000 (14:24 +0200)]
Update `inline_call` assist doc example

3 years agoshow 'as' or 'use' before label traits
mahdi-frms [Mon, 5 Jul 2021 12:14:44 +0000 (16:44 +0430)]
show 'as' or 'use' before label traits

3 years agoMerge #9474
bors[bot] [Mon, 5 Jul 2021 11:50:18 +0000 (11:50 +0000)]
Merge #9474

9474: fix: Inline parameters in `inline_call` if possible r=Veykril a=Veykril

Fixes #9491

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFixup emitted whitespace in most cases
Lukas Wirth [Mon, 5 Jul 2021 11:37:40 +0000 (13:37 +0200)]
Fixup emitted whitespace in most cases

3 years agoMerge #9493
bors[bot] [Mon, 5 Jul 2021 11:20:21 +0000 (11:20 +0000)]
Merge #9493

9493: minor: drop dummy authors field r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: drop dummy authors field
Aleksey Kladov [Mon, 5 Jul 2021 11:19:41 +0000 (14:19 +0300)]
minor: drop dummy authors field

3 years agoMerge #9478
bors[bot] [Mon, 5 Jul 2021 11:13:07 +0000 (11:13 +0000)]
Merge #9478

9478: show imported trait on autocompletion of associated items r=matklad a=mahdi-frms

Fixes: #7456
The thing is however, due to the trait being already imported, the path to the trait is just the name of the trait itself.
I also updated the test concerning the labels.

Co-authored-by: mahdi-frms <mahdif1380@outlook.com>
3 years agoeliminate find_use_path and show 'as' and 'use'
mahdi-frms [Sun, 4 Jul 2021 16:27:45 +0000 (20:57 +0430)]
eliminate find_use_path and show 'as' and 'use'

3 years agoshow imported trait on autocompletion of associated items
mahdi-frms [Sat, 3 Jul 2021 20:29:47 +0000 (00:59 +0430)]
show imported trait on autocompletion of associated items

3 years agoMerge #9490
bors[bot] [Sun, 4 Jul 2021 14:35:00 +0000 (14:35 +0000)]
Merge #9490

9490: minor: untangle complex condition r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: untangle complex condition
Aleksey Kladov [Sun, 4 Jul 2021 14:32:59 +0000 (17:32 +0300)]
minor: untangle complex condition

3 years agoMerge #9489
bors[bot] [Sun, 4 Jul 2021 14:04:01 +0000 (14:04 +0000)]
Merge #9489

9489: feat: always prefer postfix snippets if there's exact textual match r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: improve feedback for relevance tests
Aleksey Kladov [Sun, 4 Jul 2021 13:54:30 +0000 (16:54 +0300)]
internal: improve feedback for relevance tests

3 years agofeat: always prefer postfix snippets if there's exact textual match
Aleksey Kladov [Sun, 4 Jul 2021 13:50:02 +0000 (16:50 +0300)]
feat: always prefer postfix snippets if there's exact textual match

Note that, while we don't currently have a fuzzy-matching score, it
makes sense to special-case postfix templates -- it's very annoying when
`.not()` gets sorted before `.not`. We might want to move this infra to
fuzzy matching, once we have that!

3 years agoMerge #9488
bors[bot] [Sun, 4 Jul 2021 12:44:39 +0000 (12:44 +0000)]
Merge #9488

9488: internal: make CompletionItem and SourceChange consistent r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: make CompletionItem and SourceChange consistent
Aleksey Kladov [Sun, 4 Jul 2021 12:41:28 +0000 (15:41 +0300)]
internal: make CompletionItem and SourceChange consistent

Before this PR, SourceChange used a bool and CompletionItem used an enum
to signify if edit is a snippet. It makes sense to use the same pattern
in both cases. `bool` feels simpler, as there's only one consumer of
this API, and all producers are encapsulated anyway (we check the
capability at the production site).

3 years agoMerge #9487
bors[bot] [Sun, 4 Jul 2021 11:15:22 +0000 (11:15 +0000)]
Merge #9487

9487: internal: better factoring for to_proto::completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: better factoring for to_proto::completion
Aleksey Kladov [Sun, 4 Jul 2021 11:08:33 +0000 (14:08 +0300)]
internal: better factoring for to_proto::completion

One source completion can produce up to two lsp completions.
Additionally, `preselct` and `sort_text` are global properties of the
whole set of completions, so the right granularity here is to convert
many completions.

As a side-benefit, we no loger allocate intermediate vec.

3 years agoMerge #9485
bors[bot] [Sun, 4 Jul 2021 09:57:11 +0000 (09:57 +0000)]
Merge #9485

9485: minor: style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: style
Aleksey Kladov [Sun, 4 Jul 2021 08:12:41 +0000 (11:12 +0300)]
minor: style

3 years agoMerge #9484
bors[bot] [Sun, 4 Jul 2021 09:48:28 +0000 (09:48 +0000)]
Merge #9484

9484: internal: make `xtask` lighter r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: make `xtask` lighter
Aleksey Kladov [Sun, 4 Jul 2021 09:42:35 +0000 (12:42 +0300)]
internal: make `xtask` lighter

Moving tests to `rust-analyzer` crate allows removing walkdir dependency
from `xtask`. It does seem more reasonable to keep tidy tests outside of
the "build system" and closer to other integration tests.

3 years agoMerge #9483
bors[bot] [Sun, 4 Jul 2021 08:31:26 +0000 (08:31 +0000)]
Merge #9483

9483: minor: fix lint completion sourcegen r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: fix lint completion sourcegen
Aleksey Kladov [Sun, 4 Jul 2021 08:26:03 +0000 (11:26 +0300)]
minor: fix lint completion sourcegen

3 years agoMerge #9482
bors[bot] [Sun, 4 Jul 2021 08:21:11 +0000 (08:21 +0000)]
Merge #9482

9482: minor: better error message r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: better error message
Aleksey Kladov [Sun, 4 Jul 2021 08:20:31 +0000 (11:20 +0300)]
minor: better error message

3 years agoMerge #9479
bors[bot] [Sat, 3 Jul 2021 21:45:13 +0000 (21:45 +0000)]
Merge #9479

9479: `replace_qualified_name_with_use` insert qualified import paths r=Veykril a=Veykril

Also prevents the assist from triggering on associated items.

Fixes #9472.

This PR gets rid of a lot of tests that only really test the `insert_use` infra which already has its own tests, so these tests are of no use.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years ago`replace_qualified_name_with_use` insert qualified import paths
Lukas Wirth [Sat, 3 Jul 2021 21:42:59 +0000 (23:42 +0200)]
`replace_qualified_name_with_use` insert qualified import paths

3 years agoMerge #9477
bors[bot] [Sat, 3 Jul 2021 20:13:14 +0000 (20:13 +0000)]
Merge #9477

9477: fix: Don't show an import per namespace in auto_import r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9113
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't show an import per namespace in auto_import
Lukas Wirth [Sat, 3 Jul 2021 20:11:01 +0000 (22:11 +0200)]
Don't show an import per namespace in auto_import

3 years agoAdd some more `inline_call` tests
Lukas Wirth [Sat, 3 Jul 2021 19:42:59 +0000 (21:42 +0200)]
Add some more `inline_call` tests

3 years agoMerge #9476
bors[bot] [Sat, 3 Jul 2021 19:26:04 +0000 (19:26 +0000)]
Merge #9476

9476: internal: overhaul codegen r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofeat: regenrate lint completions
Aleksey Kladov [Sat, 3 Jul 2021 19:24:36 +0000 (22:24 +0300)]
feat: regenrate lint completions

3 years agointernal: overhaul code generation
Aleksey Kladov [Sat, 3 Jul 2021 19:11:03 +0000 (22:11 +0300)]
internal: overhaul code generation

* Keep codegen adjacent to the relevant crates.
* Remove codgen deps from xtask, speeding-up from-source installation.

This regresses the release process a bit, as it now needs to run the
tests (and, by extension, compile the code).

3 years agoInline parameters in `inline_call` if possible
Lukas Wirth [Sat, 3 Jul 2021 18:05:00 +0000 (20:05 +0200)]
Inline parameters in `inline_call` if possible

3 years agoMerge #9468
bors[bot] [Sat, 3 Jul 2021 16:13:06 +0000 (16:13 +0000)]
Merge #9468

9468: feat: Make `inline_function` work on methods r=Veykril a=Veykril

Now called `inline_call`.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge the inline function/method assists into `inline_call`
Lukas Wirth [Sat, 3 Jul 2021 15:13:56 +0000 (17:13 +0200)]
Merge the inline function/method assists into `inline_call`

3 years agoMerge #9473
bors[bot] [Sat, 3 Jul 2021 15:41:13 +0000 (15:41 +0000)]
Merge #9473

9473: feat: join lines joins two ifs into `else if` r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofeat: join lines joins two ifs into `else if`
Aleksey Kladov [Sat, 3 Jul 2021 15:36:08 +0000 (18:36 +0300)]
feat: join lines joins two ifs into `else if`

3 years agoMerge #9471
bors[bot] [Sat, 3 Jul 2021 10:38:17 +0000 (10:38 +0000)]
Merge #9471

9471: minor: Don't hide meta lines r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't hide meta lines
Lukas Wirth [Sat, 3 Jul 2021 10:16:07 +0000 (12:16 +0200)]
Don't hide meta lines

3 years agoUpdate ISSUE_TEMPLATE
Daiki Ihara [Sat, 3 Jul 2021 03:43:25 +0000 (12:43 +0900)]
Update ISSUE_TEMPLATE

3 years agoUpdate bug_repord template
Daiki Ihara [Mon, 28 Jun 2021 12:55:21 +0000 (21:55 +0900)]
Update bug_repord template

3 years agofeat: Implement `inline_method` assist
Lukas Wirth [Fri, 2 Jul 2021 23:33:34 +0000 (01:33 +0200)]
feat: Implement `inline_method` assist

3 years agoMerge #9467
bors[bot] [Fri, 2 Jul 2021 23:32:12 +0000 (23:32 +0000)]
Merge #9467

9467: internal: wrap_return_type_in_result works on the HIR r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSimplify
Lukas Wirth [Fri, 2 Jul 2021 21:52:43 +0000 (23:52 +0200)]
Simplify

3 years agowrap_return_type_in_result works on the HIR
Lukas Wirth [Fri, 2 Jul 2021 21:19:32 +0000 (23:19 +0200)]
wrap_return_type_in_result works on the HIR

3 years agoMerge #9465
bors[bot] [Fri, 2 Jul 2021 19:11:08 +0000 (19:11 +0000)]
Merge #9465

9465: feat: `replace_match_with_if_let` works on more 2-arm matches r=Veykril a=Veykril

Now it works on pretty much on all 2-arm matches where only up to 1 arm binds a name instead of requiring either a sad or wildcard pattern to be present.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't check sad pattern equality by text
Lukas Wirth [Fri, 2 Jul 2021 19:10:38 +0000 (21:10 +0200)]
Don't check sad pattern equality by text

3 years ago`replace_match_with_if_let` works on more binary matches
Lukas Wirth [Fri, 2 Jul 2021 19:05:10 +0000 (21:05 +0200)]
`replace_match_with_if_let` works on more binary matches

3 years agoSimplify
Lukas Wirth [Fri, 2 Jul 2021 17:50:37 +0000 (19:50 +0200)]
Simplify

3 years agoAdd cov_mark
Lukas Wirth [Fri, 2 Jul 2021 17:34:49 +0000 (19:34 +0200)]
Add cov_mark

3 years agoMerge #9464
bors[bot] [Fri, 2 Jul 2021 13:51:57 +0000 (13:51 +0000)]
Merge #9464

9464: fix: Fix runnables using wrong file ids for module doctests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix runnables using wrong file ids for module doctests
Lukas Wirth [Fri, 2 Jul 2021 13:43:47 +0000 (15:43 +0200)]
Fix runnables using wrong file ids for module doctests

3 years agoMerge #9463
bors[bot] [Fri, 2 Jul 2021 13:43:40 +0000 (13:43 +0000)]
Merge #9463

9463: fix: Remove incorrect std dep r=jonas-schievink a=jonas-schievink

libstd doesn't actually depend on `proc_macro`. cc https://github.com/rust-analyzer/rust-analyzer/pull/9456#issuecomment-873005974

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove incorrect std dep
Jonas Schievink [Fri, 2 Jul 2021 13:42:42 +0000 (15:42 +0200)]
Remove incorrect std dep

3 years agoMerge #9462
bors[bot] [Fri, 2 Jul 2021 13:35:13 +0000 (13:35 +0000)]
Merge #9462

9462: minor: Print runnable kind on assertion failure for better debuggability r=Veykril a=Veykril

We are somehow hitting this when looking at `crates\ide_db\src\lib.rs` and I don't see how.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoPrint runnable kind on assertion failure for better debuggability
Lukas Wirth [Fri, 2 Jul 2021 13:28:38 +0000 (15:28 +0200)]
Print runnable kind on assertion failure for better debuggability