Commit Graph

18112 Commits

Author SHA1 Message Date
Kirill Bulatov
8ed9724413 Do not erase Cargo diagnostics from the closed documents 2021-07-11 00:04:11 +03:00
bors[bot]
2e52d6ea93
Merge #9557
9557: fix: Respect coercions in `inline_call` r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-10 17:25:16 +00:00
Lukas Wirth
9e1eb77f6b Respect coercions in inline_call 2021-07-10 19:24:49 +02:00
Lukas Wirth
7e6f40b6f1 Expose coercions for patterns and expressions in semantics 2021-07-10 19:03:46 +02:00
bors[bot]
f83f069f94
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>
2021-07-10 16:25:58 +00:00
Lukas Wirth
576e3a4e12 add_explicit_type respects coercions 2021-07-10 18:19:46 +02:00
Lukas Wirth
d5a43d1f85 Resolve type adjustments 2021-07-10 18:19:23 +02:00
bors[bot]
2d7727fe31
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>
2021-07-10 16:07:01 +00:00
Lukas Wirth
0796288ed2 Disambiguate replace with if let assist labels 2021-07-10 18:00:22 +02:00
bors[bot]
4337f5e456
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>
2021-07-10 15:59:26 +00:00
Laurențiu Nicola
df729eda69 Bump chalk 2021-07-10 18:58:14 +03:00
Laurențiu Nicola
861f1e2a86 Bump rustc_lexer a little 2021-07-10 18:57:59 +03:00
Lukas Wirth
79614c486b Enable auto_import on ident patterns 2021-07-10 17:57:33 +02:00
Laurențiu Nicola
932d4183a1 Bump deps 2021-07-10 18:55:01 +03:00
bors[bot]
6f3a3bdde4
Merge #9551
9551: fix: `replace_qualified_name_with_use` keeps qualifier for import r=Veykril a=Veykril

Fixes #9537, #9540
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-10 15:04:15 +00:00
Lukas Wirth
0db5992311 replace_qualified_name_with_use keeps qualifier for import 2021-07-10 17:03:24 +02:00
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
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