Commit Graph

24377 Commits

Author SHA1 Message Date
Lukas Wirth
14f19c73e9 fix: Don't render fieldless discriminant inlay hints for datacarrying enums 2023-02-01 11:38:39 +01:00
bors
bfe82cda48 Auto merge of #14036 - Veykril:write-method-resolution, r=Veykril
Record method resolution for remaining operator expressions

This allows goto def and future substituted hover to work for the concrete impls.
2023-02-01 10:23:33 +00:00
Lukas Wirth
c40b0895f0 Implement proc-macro-api versioning 2023-02-01 11:04:20 +01:00
bors
a4d3a4a75b Auto merge of #14068 - HKalbasi:unsize, r=flodiebold
Unsize cast array only on pointer type

fix #14000
2023-01-31 21:33:04 +00:00
hkalbasi
0bf0d937b8 unsize cast array only on pointer type 2023-01-31 20:23:38 +03:30
bors
0fcef7fdd3 Auto merge of #14067 - jonas-schievink:lazy-trace-output, r=jonas-schievink
fix: Lazily create the trace output channel

Fixes https://github.com/rust-lang/rust-analyzer/issues/13055
2023-01-31 14:59:18 +00:00
Jonas Schievink
5b1187a046 Remove some types ¯\_(ツ)_/¯ 2023-01-31 15:49:39 +01:00
bors
da249539e8 Auto merge of #14061 - Veykril:generic-tt, r=Veykril
Make tt generic over the span data

This also fixes up our delimiter representation in tt, it is no longer optional (we use invisible delims in the same way as before, that is still incorrectly) and we now store two spans instead of one.

These changes should help with adjusting our token map. Though this will probably break proc-macros in some ways, will need to test that for now.
2023-01-31 14:45:45 +00:00
Jonas Schievink
56f81ebc3e Lazily create the trace output channel 2023-01-31 15:43:47 +01:00
Lukas Wirth
41a46a78f2 Make tt generic over the span data 2023-01-31 14:58:16 +01:00
Ryo Yoshida
3edde6fcc1
Support generic function in generate_function assist 2023-01-31 21:05:25 +09:00
Ryo Yoshida
32955c30cd
Add method to get generic parameters in a type 2023-01-31 21:05:23 +09:00
Ryo Yoshida
0df70d37fc
Minor refactoring 2023-01-31 21:05:04 +09:00
bors
d805c74c51 Auto merge of #14064 - WaffleLapkin:simplify_is_exit_check, r=lnicola
minor: Simplify `is_exit` check in `lsp-server`

(this is what `socket` one does)
2023-01-31 11:34:19 +00:00
bors
577e839c0d Auto merge of #14063 - Veykril:proc-macro-abi-1-58, r=Veykril
feat: Remove support for 1.58 proc-macro abi

This seems old enough that we can drop the support for it now, the less ABIs we have the less work it is adjusting our span implementation.

Extracted from https://github.com/rust-lang/rust-analyzer/pull/14061, will rebase that over this once merged.
2023-01-31 11:17:29 +00:00
bors
06981d4b10 Auto merge of #14062 - WaffleLapkin:сurrent_edition, r=Veykril
internal: Set "current" edition to 2021

:p
2023-01-31 11:03:49 +00:00
Maybe Waffle
41fda76152 simplify is_exit check 2023-01-31 11:01:01 +00:00
Lukas Wirth
183f171263 Remove support for 1.58 proc-macro abi 2023-01-31 11:56:12 +01:00
Maybe Waffle
249ea9502d Set "current" edition to 2021 2023-01-31 10:51:43 +00:00
bors
b4832b3d00 Auto merge of #14056 - Veykril:allow_internal_unsafe, r=Veykril
Parse macros `allow_internal_unsafe` attribute

We don't use it for anything yet but it might become part of hygiene
2023-01-31 10:50:47 +00:00
bors
be76f357af Auto merge of #14034 - lnicola:tweak-change-collapsing, r=Veykril
internal: Tweak change collapsing

CC https://github.com/rust-lang/rust-analyzer/pull/14025#discussion_r1087946555.
2023-01-31 10:37:50 +00:00
gftea
fd1a9a93fe tidy by rustfmt 2023-01-30 20:34:07 +01:00
gftea
04a4ac1cff trim trailing whitespaces 2023-01-30 20:17:12 +01:00
gftea
5356a8b157 trim trailing whitespaces (#14044) 2023-01-30 20:03:50 +01:00
gftea
75676ebe86
Update crates/ide/src/file_structure.rs
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2023-01-30 19:17:48 +01:00
bors
b75803ad31 Auto merge of #14057 - jonas-schievink:improve-match-to-let-else, r=jonas-schievink
feat: Improve "match to let else" assist

Closes https://github.com/rust-lang/rust-analyzer/issues/13540

Handles complex `let` patterns (rather than just idents), and diverging block expressions have their `{`/`}` stripped to create nicer code.
2023-01-30 16:57:48 +00:00
gftea
28b7460db1 fix negative trait bound in outline view (#14044) 2023-01-30 17:57:27 +01:00
Jonas Schievink
6321b25a21 Apply the assist to itself 2023-01-30 17:52:15 +01:00
Jonas Schievink
1f20804b6e Improve "match to let-else" assist 2023-01-30 17:50:02 +01:00
Lukas Wirth
c65782e64a Parse macros allow_internal_unsafe attribute 2023-01-30 15:41:08 +01:00
Laurențiu Nicola
deff5f22f6 Tweak change collapsing 2023-01-29 17:20:22 +02:00
bors
f1b257f4eb Auto merge of #14041 - jonas-schievink:record-lit-signature-help, r=Veykril
feat: show signature help when typing record literal

Closes https://github.com/rust-lang/rust-analyzer/issues/13910

![Screenshot_20230127_191848](https://user-images.githubusercontent.com/1786438/215165358-8e51cd1a-d7c3-4c9d-a2d8-c22638bcf500.png)
2023-01-27 20:12:21 +00:00
Jonas Schievink
cad4cb38cd Make it work with Self { .. } 2023-01-27 19:25:31 +01:00
Jonas Schievink
e993072661 Provide signature help when typing record literal 2023-01-27 19:17:23 +01:00
bors
261afbdd88 Auto merge of #14039 - jonas-schievink:add-missing-impl-members-in-blocks, r=jonas-schievink
fix: Fix "add missing impl members" assist for impls inside blocks
2023-01-27 15:52:59 +00:00
Jonas Schievink
e7a2d13ff6 Fix "add missing impl members" assist for impls inside blocks 2023-01-27 16:51:55 +01:00
bors
0063e89469 Auto merge of #14038 - Veykril:no-sysroot-hard-err, r=Veykril
Don't fail workspace loading if sysroot can't be found
2023-01-27 13:03:45 +00:00
Lukas Wirth
b2598f4801 Don't fail workspace loading if sysroot can't be found 2023-01-27 13:49:28 +01:00
bors
2935a89f3f Auto merge of #14037 - Veykril:if-let-match, r=Veykril
Handle boolean scrutinees in match <-> if let replacement assists better
2023-01-27 11:35:33 +00:00
Lukas Wirth
6829190611 Handle boolean scrutinees in match <-> if let replacement assists better 2023-01-27 12:33:40 +01:00
Lukas Wirth
4ff6f3845f Update ide test outputs 2023-01-27 11:40:44 +01:00
Lukas Wirth
4b4eabad3c Record method resolution for try expressions 2023-01-27 11:25:34 +01:00
Lukas Wirth
a7f81e3cdc Record method resolution for index expressions 2023-01-27 11:15:05 +01:00
Lukas Wirth
54da0bfbf0 Record method resolution for call expressions 2023-01-27 11:06:41 +01:00
bors
9814d79841 Auto merge of #14035 - Veykril:ast-id-arg, r=Veykril
minor: Remove unnecessary arg in `LowerCtx::ast_id`
2023-01-26 15:37:10 +00:00
Lukas Wirth
4a677e91aa minor: Remove unnecessary arg in LowerCtx::ast_id 2023-01-25 21:52:28 +01:00
bors
dd673eea33 Auto merge of #14025 - Veykril:changekind-fix, r=jonas-schievink
fix: Fix process-changes not deduplicating changes correctly

probably fixes https://github.com/rust-lang/rust-analyzer/issues/12873 (will close it with this nevertheless as its not really reproducible)
2023-01-25 15:43:01 +00:00
bors
6fd5769996 Auto merge of #14011 - bvanjoi:fix-unwrap-block, r=jonas-schievink
fix(ide-assists): unwrap block when it parent is let stmt

fix #13990
2023-01-25 15:04:03 +00:00
bors
3e57a77cd1 Auto merge of #14026 - jonas-schievink:fix-libs-publish, r=jonas-schievink
internal: Try to fix auto-publishing of lib crates

https://github.com/rust-lang/rust-analyzer/issues/13912
2023-01-25 14:46:07 +00:00
Jonas Schievink
7cb0cfa3aa Try to fix auto-publishing of lib crates 2023-01-25 15:02:52 +01:00