Lukas Wirth
91d5a689c7
Add config for disabling non standard lsp highlight tokens
2023-05-11 10:01:38 +02:00
Lukas Wirth
4b42acf617
Add basic support for augmentsSyntaxTokens
2023-05-10 20:48:51 +02:00
bors
c26a43d6bd
Auto merge of #14764 - lnicola:deps-fixes-2, r=lnicola
...
minor: Hide deps panel outside of Rust projects and set missing category
Closes #14760
2023-05-08 18:44:59 +00:00
Laurențiu Nicola
f8477d0cb4
Hide deps panel outside of Rust projects and set missing category
2023-05-08 21:43:59 +03:00
bors
aaed89ac04
Auto merge of #14763 - lnicola:dep-tree-fixes, r=lnicola
...
Fix manual formatting and remove duplicate command
2023-05-08 18:28:58 +00:00
Laurențiu Nicola
053741c28c
Remove duplicate command
2023-05-08 21:27:52 +03:00
Laurențiu Nicola
10637cf3e8
Fix formatting
2023-05-08 21:27:43 +03:00
Laurențiu Nicola
b632c7d322
Fix broken table
2023-05-08 21:27:35 +03:00
bors
d3ce333ec8
Auto merge of #14742 - Veykril:closure-capture-inlays, r=Veykril
...
feat: Closure capture inlay hints
I opted for a fictional `move(foo, &bar, &mut qux)` syntax here, disabled by default as these are not correct rust syntax and hence could cause confusion.
![image](https://user-images.githubusercontent.com/3757771/236447484-649a4ea6-ad61-496e-bad8-765a5236150e.png )
2023-05-08 09:52:29 +00:00
Lukas Wirth
4c5fd19ee5
Render places in capture inlay hints
2023-05-08 09:50:58 +02:00
bors
ff8b969951
Auto merge of #14727 - HKalbasi:mir, r=HKalbasi
...
Lazy evaluate consts in `path_to_const`
fix #14275
2023-05-08 07:14:57 +00:00
bors
833d5301d1
Auto merge of #14758 - lumenian:hover-layout-config, r=HKalbasi
...
Add config for disabling hover memory layout data
Requested in https://github.com/rust-lang/rust-analyzer/pull/14748#issuecomment-1537190252
2023-05-07 16:22:57 +00:00
Yury Ivanou
8e1ba7fdab
Fix memory layout config not working for closures
2023-05-07 19:10:01 +03:00
Yury Ivanou
98a4c5049f
Rename hover memory layout config key
2023-05-07 18:37:56 +03:00
Yury Ivanou
4ed0fa8414
Add config for disabling hover memory layout data
2023-05-07 18:21:07 +03:00
bors
aaf670b649
Auto merge of #14757 - azdavis:master, r=lnicola
...
Fix libs publish branch filter
line-index didn't actually get published from #14733 , probably because the branch filter was for main but the main branch is called master here. This fixes the workflow file
I also tweaked the libs readme mostly just so the paths filter would pick up the changes.
2023-05-07 09:54:50 +00:00
Ariel Davis
db40fef6b1
Improve lib readme
2023-05-07 02:41:44 -07:00
Ariel Davis
913c1b846e
Publish libs on master push
2023-05-07 02:40:37 -07:00
bors
260e996140
Auto merge of #14733 - azdavis:master, r=matklad
...
Make line-index a lib, use nohash_hasher
These seem like they are not specific to rust-analyzer and could be pulled out to their own libraries. So I did.
https://github.com/azdavis/millet/issues/31
2023-05-06 23:37:02 +00:00
Ariel Davis
60056b8845
Expose len
2023-05-06 15:44:37 -07:00
Ariel Davis
9d4d45215a
Rename
2023-05-06 15:44:09 -07:00
Ariel Davis
369e430b05
Improve doc
2023-05-06 15:42:15 -07:00
Ariel Davis
1cf74802ab
Improve docs
2023-05-06 15:14:02 -07:00
Ariel Davis
ed498b6eff
Rm out of bounds
2023-05-06 15:11:18 -07:00
Ariel Davis
cc2936b93e
Use size field
2023-05-06 15:10:35 -07:00
Ariel Davis
510050ecdc
Add more types
2023-05-06 15:09:34 -07:00
Ariel Davis
7a7f90cf28
Use de morgan
2023-05-06 15:06:51 -07:00
Ariel Davis
7cdca727a8
Use all not instead of find is none
2023-05-06 15:06:23 -07:00
Ariel Davis
e4d053e794
Rm into
2023-05-06 15:05:38 -07:00
Ariel Davis
1bc6bca478
Use checked
2023-05-06 15:05:03 -07:00
bors
a10fd83120
Auto merge of #14748 - lumenian:type-alias-layout, r=HKalbasi
...
Show type alias layout
This PR expands on #13490 to allow displaying layout data on hover for type aliases.
2023-05-06 19:18:30 +00:00
bors
bb66f6fc3c
Auto merge of #14750 - lowr:fix/rustc_reservation_impl, r=HKalbasi
...
fix: ignore impls with `#[rustc_reservation_impl]`
Fixes #12247
Fixes #14279
Currently core has two blanket impls for `From`: `impl<T> From<T> for T` and `impl<T> From<!> for T`. These are conflicting and thus chalk cannot uniquely solve `S: From<?0>` for any type `S`.
The latter impl is actually a reservation impl and should not be considered during trait selection. More generally, impls attributed with perma-unstable `#[rustc_reservation_impl]` attribute should be disregarded except for coherence checks. See rust-lang/rust#64631 and rust-lang/rust#64715 for details.
I chose to entirely ignore them in hir-ty because we don't do coherence checks.
2023-05-06 17:44:48 +00:00
Ryo Yoshida
9360adccda
Ignore impls with #[rustc_reservation_impl]
2023-05-07 01:31:36 +09:00
bors
5ee39a6ee5
Auto merge of #14749 - matklad:matklad/panic-is-a-problem, r=lnicola
...
feat: define problem matcher for panics in VS Code
Now in VS Code "go to next error" (`F8`) will bring you to the source of a panic.
2023-05-06 15:54:00 +00:00
Aleksey Kladov
7bc60f512e
feat: define problem matcher for panics in VS Code
...
Now in VS Code "go to next error" (`F8`) will bring you to the source of
a panic.
2023-05-06 16:49:42 +01:00
Yury Ivanou
ecc081d625
Show type alias layout on hover
2023-05-06 16:58:57 +03:00
Ariel Davis
343976fe56
Return None for too-large offset
2023-05-06 02:08:47 -07:00
Ariel Davis
e8a93306f0
Remove 0 TextSize at front
2023-05-06 01:46:33 -07:00
Ariel Davis
6500487735
Rename
2023-05-06 01:37:25 -07:00
Ariel Davis
0ad2450396
Check for inside multibyte
2023-05-06 01:05:28 -07:00
Ariel Davis
902b3438c9
Use try_line_col
2023-05-06 01:04:41 -07:00
Ariel Davis
d683e22021
Use u32 more
2023-05-06 01:03:18 -07:00
Ariel Davis
8012acc90e
Use a from
2023-05-06 01:02:37 -07:00
Ariel Davis
84a6cb3bfc
Inline
2023-05-06 00:59:56 -07:00
Ariel Davis
02e8bb0c6e
Return Option
2023-05-06 00:57:57 -07:00
Ariel Davis
9de213c4fe
Swap, tweak comments
2023-05-06 00:56:30 -07:00
Ariel Davis
fcbe73ec1c
Refactor position
2023-05-06 00:52:32 -07:00
Ariel Davis
0bb21533c6
Tweak comments, swap
2023-05-06 00:52:11 -07:00
Ariel Davis
594a41e7bf
Use pre.1, tweak comment
2023-05-06 00:51:25 -07:00
Ariel Davis
1ad0779a00
Make WideEncoding non-exhaustive
2023-05-06 00:49:23 -07:00