9202: feat: Make `MemoryUsage` work on Windows r=jonas-schievink a=jonas-schievink
Unfortunately there is no convenient API for heap statistics, so this instead uses the Commit Charge value, which is the amount of memory that needs to be allocated either in physical RAM or in the page file. This approximation seems to be good enough to find queries that waste a large amount of memory, but it should generally be expected to be off by several MB.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
9181: Don't complete values in type position r=jonas-schievink a=Veykril
Will add some proper tests in a bit
9182: fix: don't complete derive macros as fn-like macros r=jonas-schievink a=jonas-schievink
Part of https://github.com/rust-analyzer/rust-analyzer/issues/8518
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
9180: fix: fix some IDE functionality inside attribute macros r=jonas-schievink a=jonas-schievink
In `SourceToDefCtx::find_container`, we might encounter a container that has an attribute macro. We need to skip that item, instead of bailing out and creating an empty `Resolver`, otherwise all names in the macro stay unresolved.
Part of https://github.com/rust-analyzer/rust-analyzer/issues/9142
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
9153: QOL: VSCode status bar icon on click now shows server status r=matklad a=Milo123459
Now, when you click the little status bar text, it will automatically reload the server. I don't think I've ever seen anyone click it randomly, and, it's there to save you a few clicks.
Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
9169: internal: steps towards attribute macro token mapping r=jonas-schievink a=jonas-schievink
This doesn't work yet, but we seem to be getting a bit further along (for example, we now stop highlighting `use` items inside item with attribute macros as if they were written verbatim).
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
9144: Extend convert_tuple_struct_to_named_struct to also apply to enum tuple variants r=matklad a=joshuawarner32
This is largely copied and adapted from the existing `convert_tuple_struct_to_named_struct` code.
Not sure if maybe some of this code can/should be shared between those two assists - but the differences are significant enough to make it at least seem like a non-trivial refactor.
Co-authored-by: Joshua Warner <joshuawarner32@gmail.com>
9166: Clarify label documentation r=matklad a=flodiebold
Also some other cleanups while I'm there.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
9164: internal: Reduce the number of direct fields in `CompletionContext` some more r=Veykril a=Veykril
Doesn't make the code much simpler yet.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>