-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Subtree update of rust-analyzer
#131832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subtree update of rust-analyzer
#131832
Conversation
Async blocks act similar to async functions in that the await keywords are related, but also act like functions where the exit points are related.
Just like we don't check for types containing unknown.
When providing a custom rustfmt command, join it with the project root instead of the workspace root. This fixes rust-analyzer getting the wrong invocation path in projects containing subprojects. This makes the behaviour consistent with how a custom path provided in rust-analyzer.procMacro.server behaves already. Resolves issue rust-lang#18222
before, when formatting struct constructor for `struct S(usize, usize)` it would format as: extern "rust-call" S(usize, usize) -> S but after this change, we'll format as: fn S(usize, usize) -> S
This ensures that when being on an `await` token, it still only highlights the yield points and not the exit points.
…-formatting, r=flodiebold hir-ty: change struct + enum variant constructor formatting. before, when formatting struct constructor for `struct S(usize, usize)` it would format as: extern "rust-call" S(usize, usize) -> S but after this change, we'll format as: fn S(usize, usize) -> S likewise the second commit, also makes this uniform for enum variants as well. fixes rust-lang#18259
fix: Fix `prettify_macro_expansion()` when the node isn't the whole file Fixes rust-lang#18238.
…Veykril lsp: fix completion_item something_to_resolve not being a latch to true while looking at rust-lang#18245 i noticed that `something_to_resolve` could technically flap between true -> false if some subsequent fields that were requested to be resolved were empty. this fixes that by using `|=` instead of `=` when assigning to `something_to_resolve` which will prevent it from going back to false once set. although some cases it's simply assigning to `true` i opted to continue to use `|=` there for uniformity sake. but happy to change those back to `=`'s. cc `@SomeoneToIgnore`
fix: include description in label details when detail field is marked for … Fixes rust-lang/rust-analyzer#18231. When omitting the autocomplete detail field, the autocomplete label details can still be returned. Currently the label details are missing the description field if the detail field is included in resolveSupport since it is being overwritten as None and opted to be sent with `completionItem/resolve`. Example completion capabilities. ``` completion = { completionItem = { commitCharactersSupport = true, deprecatedSupport = true, documentationFormat = { "markdown", "plaintext" }, insertReplaceSupport = true, insertTextModeSupport = { valueSet = { 1, 2 } }, labelDetailsSupport = true, preselectSupport = true, resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } } ```
…nicola Fix panic when json project has relative buildfile paths The `build_file` path may be relative to the workspace root.
Run subprocesses async in vscode extension Extensions should not block the vscode extension host. Replace uses of `spawnSync` with `spawnAsync`, a convenience wrapper around `spawn`. These `spawnSync`s are unlikely to cause a real issue in practice, because they spawn very short-lived processes, so we aren't blocking for very long. That said, blocking the extension host is poor practice, and if they _do_ block for too long for whatever reason, vscode becomes useless.
…puqv, r=davidbarsky chore: rename `salsa` to `ra_salsa` Laying some groundwork to start before I import the new Salsa crate. Here's why: 1. As part of the migration, `@darichey,` `@Wilfred,` and I will create new Salsa equivalents of the existing databases/query groups. We'll get them to compile crate-by-crate. 2. Once we wrote all equivalents of all queries, we'd start to refactor usage sites of the vendored Salsa to use the new Salsa databases. 3. Starting porting usage sites of old Salsa to the new Salsa. 4. Remove the vendored `ra_salsa`; declare victory.
feat: handle self-param outside of methods when renaming close rust-lang#17427
…, disallow coercions from them too
…=davidbarsky minor: `ra-salsa` in `profile.dev.package` Since `ra-salsa`'s package name is actually `salsa` it makes the following warning in `cargo` commands; ``` warning: profile package spec `ra-salsa` in profile `dev` did not match any packages ``` and the opt level isn't applied to it.
fix: incorrect autofix for missing wrapped unit in return expr fix rust-lang#18298. We should insert `Ok(())` or `Some(())` instead of wrapping `return` with variants.
Do not consider match/let/ref of place that evaluates to ! to diverge, disallow coercions from them too Resolves rust-lang#18237
When debugging rust-analyzer and looking at logs, it's much easier to read when the timestamp is in the local timezone. Before: 2024-08-28T20:55:38.792321Z INFO ParseQuery: invoked at R18460 After: 2024-08-28T13:55:38.792321-07:00 INFO ParseQuery: invoked at R18460
internal: Use local time when formatting logs When debugging rust-analyzer and looking at logs, it's much easier to read when the timestamp is in the local timezone. Before: 2024-08-28T20:55:38.792321Z INFO ParseQuery: invoked at R18460 After: 2024-08-28T13:55:38.792321-07:00 INFO ParseQuery: invoked at R18460
Bump version of scip crate Follow up to sourcegraph/scip#284 Manually verified that SCIP generation works OK for rust-analyzer itself. cc `@RalfJung`
minor: sync from downstream
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
@bors r+ p=1 subtree update |
☀️ Test successful - checks-actions |
Finished benchmarking commit (3a85d3f): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 2.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 781.303s -> 782.574s (0.16%) |
r? @ghost