Commit Graph

12169 Commits

Author SHA1 Message Date
bors[bot]
637dbb26a7
Merge #9548
9548: add: Adding self keyword completion in complete_fn_param r=lnicola a=feniljain

Solves #9522

I haven't added Arc<self> for now as there were some conflicting opinions on it

Co-authored-by: vi_mi <fenil.jain2018@vitstudent.ac.in>
2021-07-10 11:39:13 +00:00
vi_mi
1338ddbe80 add: Adding self keyword completion in complete_fn_param 2021-07-10 16:11:15 +05:30
bors[bot]
10273a7d63
Merge #9545
9545: Record autoderef adjustments r=flodiebold a=Veykril

cc #9475

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-10 10:27:16 +00:00
Lukas Wirth
69e6511820 Record autoderef adjustments 2021-07-10 12:26:18 +02:00
bors[bot]
10ac4e5c0d
Merge #9542
9542: cargo_metadata 0.14 r=matklad a=kjeremy

Removes the following dependent crates:
* semver-parser
* pest
* ucd-trie

Removes project_model's dependency on itertools

Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-07-09 15:09:44 +00:00
kjeremy
35016c772c cargo_metadata 0.14
Removes the following dependent crates:
* semver-parser
* pest
* ucd-trie

Removes project_model's dependency on itertools
2021-07-09 11:01:55 -04:00
bors[bot]
a22a9bf2d0
Merge #9541
9541: Adding async keyword when await is present in generate_function assist r=feniljain a=feniljain

Solves #9394 

Co-authored-by: vi_mi <fenil.jain2018@vitstudent.ac.in>
2021-07-09 14:42:39 +00:00
vi_mi
57f119b5fa fix: Adding async keyword when await is present in generate_function assist 2021-07-09 20:04:55 +05:30
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
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]
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
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
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
Lukas Wirth
2e8f3fee3f Add test for trait completion label edit 2021-07-07 19:54:58 +02:00
Lukas Wirth
68f68534c6 Don't add the trait name to the insert text in completions 2021-07-07 19:42:09 +02:00
Lukas Wirth
9f9cc72ee5 Complete crate, super and self in non-usetree paths 2021-07-07 19:08:37 +02: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
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
Aleksey Kladov
b8a6ea5ab5 feat: make join lines behavior configurable
closes #9492
2021-07-05 23:47:20 +03: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
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
Jonas Schievink
835723ca67 Fix visibility computation with modules from the same block 2021-07-05 16:06:50 +02:00
Lukas Wirth
46c42166d6 Yeet replace_unwrap_with_match in favor of inline_call 2021-07-05 15:47:55 +02:00
bors[bot]
ac300eaceb
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>
2021-07-05 13:42:37 +00:00
Lukas Wirth
dafbe6940e Wrap inlined closures in parens when inlined in an expression in inline_call 2021-07-05 15:42:11 +02:00
bors[bot]
1ef077af70
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>
2021-07-05 12:40:02 +00:00
Lukas Wirth
2579dc6d82 Update inline_call assist doc example 2021-07-05 14:24:25 +02:00
mahdi-frms
6ac54319ea show 'as' or 'use' before label traits 2021-07-05 16:44:44 +04:30
bors[bot]
2bc4f9e371
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>
2021-07-05 11:50:18 +00:00
Lukas Wirth
ea02d27a1e Fixup emitted whitespace in most cases 2021-07-05 13:44:42 +02:00
bors[bot]
b52306ed37
Merge #9493
9493: minor: drop dummy authors field r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-05 11:20:21 +00:00
Aleksey Kladov
86720f2953 minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
mahdi-frms
02d33c9856 eliminate find_use_path and show 'as' and 'use' 2021-07-05 02:15:31 +04:30
mahdi-frms
486bffc23e show imported trait on autocompletion of associated items 2021-07-05 02:13:49 +04:30
Aleksey Kladov
c4d2671767 minor: untangle complex condition 2021-07-04 17:32:59 +03:00