Commit Graph

24806 Commits

Author SHA1 Message Date
Lukas Wirth
f2295cda42 Report vfs memory usage in status command 2023-04-22 09:57:48 +02:00
Lukas Wirth
f00dcf9a69 internal: Arc<String> -> Arc<str> 2023-04-22 09:48:37 +02:00
Lukas Wirth
63e3bf118d internal: Add some additional status ouput 2023-04-22 09:34:47 +02:00
Lukas Wirth
e7285507f6 Restructure symbol queries 2023-04-22 08:27:10 +02:00
Lukas Wirth
9c408970ea Deduplicate loaded projects 2023-04-18 14:27:01 +02:00
Lukas Wirth
f5f68e4dc7 Make workspace fields of config private 2023-04-18 13:25:54 +02:00
bors
9b835f334f Auto merge of #14594 - Veykril:Simplify, r=Veykril
internal: Move Expander and LowerCtx into separate modules
2023-04-17 19:00:42 +00:00
Lukas Wirth
bca8029a6e Move Expander and LowerCtx into separate modules 2023-04-17 20:44:06 +02:00
bors
b92b7c0d94 Auto merge of #14598 - lowr:fix/release-channel-from-str, r=lnicola
Fix release channel detection

We detect toolchain's release channel by looking at pre-release identifier of cargo/rustc's version string. It's empty for stable, "beta" or "beta.x" for beta, and "nightly" for nightly.

See rust-lang/rust's [bootstrap code] for how the version string is determined.

[bootstrap code]: e49122fb1c/src/bootstrap/lib.rs (L1244)
2023-04-17 18:43:47 +00:00
Ryo Yoshida
4db87f9346
Fix release channel detection
See bootstrap code in rust-lang/rust for versioning details: e49122fb1c/src/bootstrap/lib.rs (L1244)
2023-04-18 02:12:17 +09:00
bors
1f92641093 Auto merge of #14593 - lnicola:bump-deps, r=lnicola
minor: Bump a couple of deps

Only a couple because I didn't yet try to untangle the `windows-sys` / `syn 2.0`.
2023-04-17 16:08:31 +00:00
Laurențiu Nicola
160ab88bb9 Bump bitflags 2023-04-17 18:42:59 +03:00
Laurențiu Nicola
840cfd0862 Bump mimalloc 2023-04-17 17:38:47 +03:00
Laurențiu Nicola
8e192b0298 Bump cargo_metadata 2023-04-17 17:26:55 +03:00
Laurențiu Nicola
1737bd628f Bump proc-macro2 2023-04-17 17:23:09 +03:00
Laurențiu Nicola
966fa604c1 Bump libc 2023-04-17 17:22:07 +03:00
Laurențiu Nicola
3c027fed1b Bump always-assert 2023-04-17 17:21:02 +03:00
Laurențiu Nicola
ad38c30e65 Bump serde_json 2023-04-17 17:19:48 +03:00
bors
5111207d9a Auto merge of #14591 - justahero:gh-14516, r=Veykril
Restrict "sort items" assist for traits & impls

This restricts the "sort items alphabetically" assist when the selection is inside a `Impl` or `Trait` node & intersects with one of the associated items.

It re-orders the conditional checks of AST nodes in the `sort_items` function to check for more specific nodes first before checking `Trait` or `Impl` nodes. The `AssistContext` is passed into the `add_sort_methods_assist` function to check if the selection intersects with any inner items, e.g. associated const or type alias, function. In this case the assist does not apply.

Fixes: #14516
2023-04-17 12:45:31 +00:00
Sebastian Ziebell
c1712e55c6 Restrict "sort items" assist inside Impl & Trait
This fixes the applicability of the "sort items alphabetically" assist
when the selection is inside a `Trait` or `Impl`. It's now tested if the
selection is inside or overlaps with an inner node, e.g. associated
const or type alias, function.
2023-04-17 12:36:32 +02:00
bors
bab80dae44 Auto merge of #14588 - Veykril:macro-def-err, r=Veykril
fix: Actually bring back LRU limit for macro_expand query
2023-04-16 21:13:02 +00:00
Lukas Wirth
fd4bbcabe8 Actually bring back LRU limit for macro_expand query 2023-04-16 23:12:25 +02:00
bors
9b54e39762 Auto merge of #14587 - Veykril:macro-def-err, r=Veykril
fix: Bring back LRU limit for macro_expand query

Should fix the memory increase
2023-04-16 19:30:42 +00:00
Lukas Wirth
76718ea2fc Bring back LRU limit for macro_expand query 2023-04-16 21:30:04 +02:00
bors
924d30a772 Auto merge of #14585 - Veykril:macro-def-err, r=Veykril
Make `ExpandDatabase::parse_macro_expansion` and `ExpandDatabase::parse_or_expand` infallible
2023-04-16 18:50:02 +00:00
Lukas Wirth
4ea5d7f6a0 Re-introduce option for macro_arg to prevent calling macros with empty inputs 2023-04-16 20:26:26 +02:00
bors
697b335fda Auto merge of #14584 - Veykril:macro-def-err, r=Veykril
internal: Report item-level macro expansion syntax errors
2023-04-16 17:40:20 +00:00
Lukas Wirth
a2a3fecae3 Option begone part 2 2023-04-16 19:20:48 +02:00
Lukas Wirth
96a774261f Option begone part 1 2023-04-16 19:20:42 +02:00
Lukas Wirth
0f4ffaa5af Fix duplicate eager expansion errors 2023-04-16 19:20:35 +02:00
Lukas Wirth
d1632c2727 Report syntax errors from item level macro expansions 2023-04-16 17:22:06 +02:00
Lukas Wirth
71b50f9f09 Record eager expansion errors in EagerCallInfo 2023-04-16 16:11:59 +02:00
Lukas Wirth
6ae8d49e15 Simplify eager macro error handling 2023-04-16 15:46:12 +02:00
bors
f0a40c3a0e Auto merge of #14583 - Veykril:macro-def-err, r=Veykril
internal: Report macro definition errors on the definition

We still report them on the call site as well for the time being, and the diagnostic doesn't know where the error in the definition comes from, but that can be done later on
2023-04-16 12:17:24 +00:00
Lukas Wirth
a5558cdfe5 internal: Report macro definition errors on the definition 2023-04-16 14:15:59 +02:00
bors
a3888fd601 Auto merge of #14579 - KatKlo:initialization-bug, r=Veykril
Fix bug with notifications during initialization
2023-04-16 10:36:51 +00:00
bors
c0889589d1 Auto merge of #14581 - Veykril:layout-ty, r=Veykril
internal: Move layout logic from hir-def to hir-ty
2023-04-16 10:22:24 +00:00
Lukas Wirth
0bb9a17312 internal: Move layout logic from hir-def to hir-ty 2023-04-16 12:21:12 +02:00
bors
c28f538568 Auto merge of #14580 - lowr:patch/parse-more-unstable-pat, r=Veykril
Parse more exclusive range patterns and inline const patterns

Closes #13955

This PR
- implements exclusive range pattern without start bound (tracking issue: rust-lang/rust#37854)
  - additionally moves rest pattern handling into the same place since they only differ in whether another pattern follows; this actually solves some FIXMEs
- updates `PATTERN_FIRST` token set to include `const` token so we can parse inline const pattern in nested patterns
2023-04-15 20:11:30 +00:00
Ryo Yoshida
83a93f4bd3
Parse inline const pattern in nested patterns 2023-04-16 04:28:37 +09:00
Ryo Yoshida
89a1439de3
Parse exclusive range pattern 2023-04-16 04:28:29 +09:00
KatKlo
1db2a2536c Fix bug with notifications during initialization 2023-04-15 19:31:02 +02:00
bors
b218009f46 Auto merge of #14576 - HKalbasi:dev2, r=HKalbasi
Fix explicit deref problems in closure capture

fix the `need-mut` part of #14562

Perhaps surprisingly, it wasn't unique immutable borrow. The code still doesn't emit any of them, and I think those won't happen in edition 2021 (which is currently the only thing implemented), since we always capture `&mut *x` instead of `&mut x`. But I'm not very sure about it.
2023-04-14 13:23:49 +00:00
bors
57c4ee27ca Auto merge of #14578 - lnicola:simplify-method-res, r=lnicola
minor: Make inherent_impls_in_block and trait_impls_in_block infallible

Fixes https://github.com/rust-lang/rust-analyzer/pull/14574#discussion_r1166763764
2023-04-14 13:04:50 +00:00
Laurențiu Nicola
febd5065ad Make inherent_impls_in_block and trait_impls_in_block infallible 2023-04-14 16:03:45 +03:00
hkalbasi
7cb4318331 Fix explicit deref problems in closure capture 2023-04-14 15:32:40 +03:30
bors
96407424de Auto merge of #14574 - Veykril:blocks, r=Veykril
internal: Make block_def_map infallible
2023-04-14 11:48:33 +00:00
Lukas Wirth
c32d51979d internal: Make block_def_map infallible 2023-04-14 13:17:38 +02:00
bors
4667379f7e Auto merge of #14575 - Veykril:attrs, r=Veykril
internal: Put Attrs behind a query instead of AttsWithOwner

We call this for pretty much every item, so this is unnecessary wasted memory
2023-04-14 11:17:18 +00:00
Lukas Wirth
ed3a5eac3c internal: Put Attrs behind a query instead of AttsWithOwner 2023-04-14 12:47:33 +02:00