Commit graph

18092 commits

Author SHA1 Message Date
Laurențiu Nicola
d96c26eb16 Update rollup 2021-07-10 18:29:07 +03:00
Laurențiu Nicola
f6b216681d Update eslint plugins 2021-07-10 18:29:06 +03:00
Laurențiu Nicola
f97c86501d Update eslint 2021-07-10 18:29:06 +03:00
Laurențiu Nicola
7df4bdb873 Update @types/node 2021-07-10 18:29:06 +03:00
bors[bot]
eab5d985ec
Merge #9512
9512: Record coercion adjustments r=Veykril a=Veykril

cc https://github.com/rust-analyzer/rust-analyzer/issues/9475

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-09 14:07:23 +00:00
Lukas Wirth
9272942b92 Use CoerceMany in BreakableContext 2021-07-09 15:51:07 +02:00
bors[bot]
80f193e3f8
Merge #9536
9536: Represent opaque types with TyKind::OpaqueType r=flodiebold a=flodiebold

... instead of using `AliasTy`. Chalk turns the alias type into the
placeholder during unification anyway, which confuses our method
resolution logic.

Fixes #9530.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-07-08 19:41:03 +00:00
Florian Diebold
d674d7185d Represent opaque types with TyKind::OpaqueType
... instead of using `AliasTy`. Chalk turns the alias type into the
placeholder during unification anyway, which confuses our method
resolution logic.

Fixes #9530.
2021-07-08 21:40:35 +02:00
bors[bot]
552b50de9e
Merge #9534
9534: minor: one more usless type r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-08 14:19:06 +00:00
Aleksey Kladov
706bd1c35d minor: one more usless type 2021-07-08 17:18:44 +03:00
bors[bot]
494deec715
Merge #9533
9533: minor: Update list of safe intrinsics r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-08 13:51:27 +00:00
Lukas Wirth
13d3928d0b Update list of safe intrinsics 2021-07-08 15:49:39 +02:00
bors[bot]
ff8621b4b8
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>
2021-07-08 13:05:54 +00:00
Lukas Wirth
e968d834ca Add some more adjustment test annotations 2021-07-08 15:03:57 +02:00
Manas
f5c9407a8f This patch shortens the spawned threads' names, as threads on Linux
have an upper limit of 16 characters for their names.
2021-07-08 18:27:54 +05:30
Lukas Wirth
349f2535fb Copy some comments from rustc 2021-07-08 14:31:16 +02:00
Lukas Wirth
f73d0ee439 Minor cleanup 2021-07-08 14:27:54 +02:00
Lukas Wirth
64a1b26b8d Implement CoerceMany 2021-07-08 14:16:23 +02:00
Lukas Wirth
9779526d8f Record coercion adjustments 2021-07-08 13:07:24 +02:00
bors[bot]
e44c56b616
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>
2021-07-08 09:55:27 +00:00
Laurențiu Nicola
3b2602cbb2 Don't unify array elements with their arrays 2021-07-08 12:55:00 +03:00
bors[bot]
85f0f9eb1b
Merge #9526
9526: fix: coerce array elements to a common type r=flodiebold a=jonas-schievink



Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-07-07 22:13:35 +00:00
Jonas Schievink
cb63b021ff Implement LUB coercion of array elements 2021-07-07 22:50:20 +02:00
bors[bot]
9f24cc7126
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>
2021-07-07 20:10:20 +00:00
Manas
5e6eee5f63 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.
2021-07-08 01:23:57 +05:30
bors[bot]
11f3231a75
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>
2021-07-07 17:55:58 +00:00
Lukas Wirth
2e8f3fee3f Add test for trait completion label edit 2021-07-07 19:54:58 +02:00
bors[bot]
9912b073c0
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>
2021-07-07 17:42:55 +00:00
Lukas Wirth
68f68534c6 Don't add the trait name to the insert text in completions 2021-07-07 19:42:09 +02:00
bors[bot]
cbafcca230
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>
2021-07-07 17:09:54 +00:00
Lukas Wirth
9f9cc72ee5 Complete crate, super and self in non-usetree paths 2021-07-07 19:08:37 +02:00
bors[bot]
2b6770c936
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>
2021-07-07 15:07:33 +00:00
Laurențiu Nicola
1d106640f2 Add nightly proc macro issue to the bug report template 2021-07-07 18:05:00 +03:00
bors[bot]
9d94cbb6f3
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>
2021-07-07 14:54:01 +00:00
bors[bot]
f5a100e5fd
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>
2021-07-06 18:31:51 +00:00
Lukas Wirth
d91704cac5 Invert boolean literals in assist negation logic 2021-07-06 20:30:26 +02:00
bors[bot]
112e53f10e
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>
2021-07-06 16:20:54 +00:00
bors[bot]
f9d20b6747
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>
2021-07-05 21:02:42 +00:00
Aleksey Kladov
0db4f3f6a4 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.
2021-07-06 00:00:39 +03:00
bors[bot]
795b8153c0
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>
2021-07-05 20:48:10 +00:00
Aleksey Kladov
b8a6ea5ab5 feat: make join lines behavior configurable
closes #9492
2021-07-05 23:47:20 +03:00
bors[bot]
91bfa4b154
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>
2021-07-05 17:11:09 +00:00
mahdi-frms
60e304c7b6 refactor logger flushing 2021-07-05 21:37:17 +04:30
mahdi-frms
799ec79f18 make the logs line buffered 2021-07-05 19:49:21 +04:30
bors[bot]
8b8eac5bf9
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>
2021-07-05 15:06:55 +00:00
Jonas Schievink
8bf4ecebfe Add a coverage mark 2021-07-05 17:06:16 +02:00
Lukas Wirth
e71ae68b2d Only inline closure, literal and local arguments when used once 2021-07-05 16:43:16 +02:00
bors[bot]
c7b1973a1d
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>
2021-07-05 14:24:41 +00:00
bors[bot]
169894c692
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>
2021-07-05 14:08:54 +00:00
Jonas Schievink
835723ca67 Fix visibility computation with modules from the same block 2021-07-05 16:06:50 +02:00