Commit Graph

24583 Commits

Author SHA1 Message Date
bors
9fca0a4afe Auto merge of #14316 - HKalbasi:master, r=HKalbasi
Fix stack overflow when derefrencing `&!`

fix #14310
2023-03-10 10:25:20 +00:00
hkalbasi
a980b562a7 Fix stack overflow when derefrencing &! 2023-03-10 13:44:34 +03:30
bors
070f8f8578 Auto merge of #14313 - Veykril:notifs, r=Veykril
Make project loading errors less intrusive

cc https://github.com/rust-lang/rust-analyzer/issues/14193 closes https://github.com/rust-lang/rust-analyzer/issues/9909

![image](https://user-images.githubusercontent.com/3757771/224274817-a5a8cb0c-7bda-454d-9772-5f839f360b9a.png)
2023-03-10 10:12:15 +00:00
Lukas Wirth
c03775e477 Fix is_quiescent reporting 2023-03-10 10:26:02 +01:00
Lukas Wirth
2cb60343ed Add fancy buttons to the vscode status message 2023-03-10 10:13:30 +01:00
Lukas Wirth
0d19ccb3df Make project loading errors less intrusive 2023-03-10 09:49:37 +01:00
bors
1b5bba4535 Auto merge of #14312 - HKalbasi:master, r=lnicola
Revert #14285

fix #14305
2023-03-10 08:34:27 +00:00
hkalbasi
71e1c025f8 Revert #14285 2023-03-10 11:57:30 +03:30
bors
552aea508d Auto merge of #14311 - Veykril:lib-diags, r=Veykril
internal: Don't attempt to calculate diagnostics in library crates

We already filtered these later on, but we might as well stop calculating them alltogether. This way we also show cargo diagnostics that occur outside of the workspace which can happen when something goes very wrong (and which usually then causes no check diagnostics to appear in the workspace at all)
2023-03-10 08:10:37 +00:00
Lukas Wirth
116775bc83 Don't attempt to calculate diagnostics in library crates 2023-03-10 09:08:20 +01:00
bors
14b9d182d5 Auto merge of #14306 - HKalbasi:master, r=HKalbasi
fix block with no termination in or patterns

fix #14298
2023-03-09 19:03:47 +00:00
hkalbasi
8593132a43 fix block with no termination in or patterns 2023-03-09 22:32:12 +03:30
bors
8ce5a53934 Auto merge of #14302 - Veykril:db-memory-usage, r=Veykril
internal: Add missing queries to per_query_memory_usage
2023-03-09 16:02:43 +00:00
Lukas Wirth
c49f753403 Add missing queries to per_query_memory_usage 2023-03-09 16:31:10 +01:00
bors
10a652a1e4 Auto merge of #14300 - lnicola:rustc-flycheck, r=lnicola
fix: Watch both stdout and stderr in flycheck

Fixes #14217

This isn't great because it un-mixes the messages from the two streams, but maybe it's not such a big problem?
2023-03-09 15:28:42 +00:00
Laurențiu Nicola
209cf7dc61 Watch both stdout and stderr in flycheck 2023-03-09 16:58:25 +02:00
Lukas Wirth
879cac4b28 minor: Remove dead code 2023-03-09 15:40:51 +01:00
bors
de3b12d686 Auto merge of #14299 - Veykril:local-search, r=Veykril
fix: Fix search not searching bodies of attributed items

Closes https://github.com/rust-lang/rust-analyzer/issues/14229
2023-03-09 14:33:17 +00:00
Lukas Wirth
3427d36d0e fix: Fix search not searching bodies of attributed items 2023-03-09 15:30:17 +01:00
Lukas Wirth
e158dc7246 Remove unnecessary special local handling in search 2023-03-09 15:10:26 +01:00
bors
a738737520 Auto merge of #14297 - Veykril:proc-macro-deps, r=Veykril
Add core lib to proc_macro dependencies

Fixes https://github.com/rust-lang/rust-analyzer/issues/14292
2023-03-09 13:44:59 +00:00
Lukas Wirth
d8c80e7d95 Add core lib to proc_macro dependencies 2023-03-09 12:58:07 +01:00
bors
8e404f4928 Auto merge of #14291 - HKalbasi:master, r=HKalbasi
fix multiple definition binding in match to let-else

fix #14290
2023-03-09 11:52:22 +00:00
hkalbasi
811190b913 fix multiple definition binding in match to let-else 2023-03-09 00:34:31 +03:30
bors
38e9a110d4 Auto merge of #14287 - Veykril:rustc_private-proc-macro, r=Veykril
minor: Fixup dylib extensions for rustc_private proc-macro loading

Follow up to https://github.com/rust-lang/rust-analyzer/pull/14282
2023-03-08 13:56:45 +00:00
Lukas Wirth
4ee2abaf38 minor: Fixup dylib extensions for rustc_private proc-macro loading 2023-03-08 14:45:47 +01:00
bors
3d904e024b Auto merge of #14286 - Veykril:block-def-tail-mac, r=Veykril
fix: Fix block defmap not looking into tail expressions for macro calls

Fixes https://github.com/rust-lang/rust-analyzer/issues/14263
2023-03-08 13:37:47 +00:00
Lukas Wirth
d038892947 fix: Fix block defmap not looking into tail expressions for macro calls 2023-03-08 14:37:27 +01:00
bors
db64f3aa69 Auto merge of #14285 - HKalbasi:mir, r=Veykril
Evaluate consts in `path_to_const`

fix #14275
2023-03-08 13:21:10 +00:00
hkalbasi
cf47c15821 Evaluate consts in path_to_const 2023-03-08 16:42:20 +03:30
bors
c9510933a5 Auto merge of #14284 - Veykril:sem-derive-unresolved, r=Veykril
fix: Highlight unresolved derives as being unresolved

Fixes https://github.com/rust-lang/rust-analyzer/issues/11350
2023-03-08 12:51:40 +00:00
Lukas Wirth
b6e7cf3201 Highlight unresolved derives as being unresolved 2023-03-08 13:51:14 +01:00
bors
6ebbd48ac0 Auto merge of #14283 - Veykril:error-notifs, r=Veykril
Load proc-macros for rustc_private crates

If the client support our server status notification there is no need to show the pop up for workspace fetching failures since that's already going to be shown in the status.
cc https://github.com/rust-lang/rust-analyzer/issues/14193
2023-03-08 12:22:10 +00:00
Lukas Wirth
b4bd27be90 Don't send error notifications for workspace failures if server status is supported 2023-03-08 13:18:44 +01:00
bors
aff6cb0080 Auto merge of #14282 - Veykril:rustc_private-proc-macro, r=Veykril
fix: Load proc-macros for rustc_private crates

Fixes https://github.com/rust-lang/rust-analyzer/issues/13591

Verified that this makes things work in the clippy repo (like resolving `sym` things for example)
2023-03-08 12:02:38 +00:00
bors
a9d97b6449 Auto merge of #14248 - XFFXFF:let_else_right_curly_brace, r=Veykril
fix: show diagnostic for } token followed by else in let else statement

fix #14221

My thinking is to check if the `expr` after `=` is block like when parse `let ... lese` , and if so, emit error.
2023-03-08 11:47:52 +00:00
Lukas Wirth
c9786484c5 Load proc-macros for rustc_private crates 2023-03-08 12:41:38 +01:00
bors
ecc32c2f85 Auto merge of #14271 - Veykril:ty-diag-err, r=Veykril
Don't trigger unresolved method/field diagnostics on types containing errors
2023-03-07 14:25:20 +00:00
Lukas Wirth
d45708fabe Don't trigger unresolved method/field diagnostics on types containing errors 2023-03-07 15:24:43 +01:00
bors
44ff3c407a Auto merge of #14232 - HKalbasi:mir, r=Veykril
MIR episode 2

This PR adds:
1. `need-mut` and `unused-mut` diagnostics
2. `View mir` command which shows MIR for the body under cursor, useful for debugging
3. MIR lowering for or-patterns and for-loops
2023-03-07 09:49:49 +00:00
XFFXFF
6e97527eae add is_blocklike func on BlockLike 2023-03-07 17:27:52 +08:00
hkalbasi
bcd7ecb242 Add profiling to mir lower and borrowck query 2023-03-07 12:42:52 +03:30
XFFXFF
98990affe5 add more tests 2023-03-07 08:24:25 +08:00
XFFXFF
995aacfce8 show diagnostic for } token followed by else in let else statement 2023-03-07 08:24:25 +08:00
bors
31c12ec282 Auto merge of #14266 - Veykril:generalize-eager-lazy, r=Veykril
feature: Make replace_or_with_or_else assists more generally applicable
2023-03-06 21:41:46 +00:00
Lukas Wirth
0ce06088f8 Fix inlay-hint tests 2023-03-06 22:39:42 +01:00
bors
1bfe96ec66 Auto merge of #14267 - Veykril:experimental-diagnostics, r=Veykril
internal: Mark unresolved field, unresolved method and expected function diagnostics experimental

Our type checking is still not good enough for us to have these diagnostics be enabled by default it seems so let's mark them as experimental for now.
2023-03-06 21:26:22 +00:00
Lukas Wirth
34a3187ee8 internal: Mark unresolved field, unresolved method and expected function diagnostics experimental 2023-03-06 22:24:38 +01:00
Lukas Wirth
199bc82ce8 feature: Make replace_or_with_or_else assists more generally applicable 2023-03-06 22:17:30 +01:00
hkalbasi
2cce9dc3e9 Make unused_mut diagnostic experimental 2023-03-06 21:09:09 +03:30