-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #124433
Closed
Closed
Subtree update of rust-analyzer #124433
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, items for `cargo test` and `cargo check` would appear as in the `Select Runnable` quick pick that appears when running `rust-analyzer: Run`, but `run` would only appear as a runnable if a `main`` function was selected in the editor. This change adds `cargo run` as an always available runnable command for binary packages. This makes it easier to develop cli / tui applications, as now users can run application from anywhere in their codebase.
…when hovering on Self type
Instead of using `core::fmt::format` to format panic messages, which may in turn panic too and cause recursive panics and other messy things, redirect `panic_fmt` to `const_panic_fmt` like CTFE, which in turn goes to `panic_display` and does the things normally. See the tests for the full call stack.
feat: Allow rust files to be used linkedProjects With this, script files become more usable as the user can at least add them manually to the linked projects, allowing them to be used "on the (manual) fly" without having to open a separate vscode window that only has files open and no folder. Also makes build scripts work for them (though no proc-macros, for some reason the dylib field is not populated in the output)
internal: Extract common fields out of `ProjectWorkspace` variants
…, r=Veykril Try to generate more meaningful names in json converter I just found out about rust-analyzer json converter, but I think it would be more convenient, if names were more useful, like using the names of the keys. Let's look at some realistic arbitrary json: ```json { "user": { "address": { "street": "Main St", "house": 3 }, "email": "example@example.com" } } ``` I think, new generated code is much easier to read and to edit, than the old: ```rust // Old struct Struct1{ house: i64, street: String } struct Struct2{ address: Struct1, email: String } struct Struct3{ user: Struct2 } // New struct Address1{ house: i64, street: String } struct User1{ address: Address1, email: String } struct Root1{ user: User1 } ``` Ideally, if we drop the numbers, I can see it being usable just as is (may be rename root) ```rust struct Address{ house: i64, street: String } struct User{ address: Address, email: String } struct Root{ user: User } ``` Sadly, we can't just drop them, because there can be multiple fields (recursive) with the same name, and we can't just easily retroactively add numbers if the name has 2 instances due to parsing being single pass. We could ignore the `1` and add number only if it's > 1, but I will leave this open to discussion and right now made it the simpler way In sum, even with numbers, I think this PR still helps in readability
Implement `BeginPanic` handling in const eval for rust-lang#16935, needs some figuring out of how to write these tests correctly
internal: Use josh for subtree syncs
…-project-loading, r=lnicola chore: add some `tracing` to project loading I wanted to see what's happening during project loading and if it could be parallelized. I'm thinking maybe, but it's not this PR :)
different error code of "no such field" error based on variant type fix rust-lang#17107 Pass variant information down to diagnostic, so that we can get different error code based on variant type. After fix: - structure <img width="868" alt="Screenshot 2024-04-23 at 21 03 27" src="https://github.com/rust-lang/rust-analyzer/assets/71200607/c2d1e389-5b62-4e9a-a133-9ae41f80615f"> - enum's structure variant <img width="937" alt="Screenshot 2024-04-23 at 21 04 41" src="https://github.com/rust-lang/rust-analyzer/assets/71200607/ad8558a7-d809-4968-b290-2f6bbb8d6b8c">
Make `cargo run` always available for binaries Previously, items for `cargo test` and `cargo check` would appear as in the `Select Runnable` quick pick that appears when running `rust-analyzer: Run`, but `run` would only appear as a runnable if a `main`` function was selected in the editor. This change adds `cargo run` as an always available runnable command for binary packages. This makes it easier to develop cli / tui applications, as now users can run application from anywhere in their codebase.
…ykril Support hovering limits for adts Fix rust-lang#17009 1. Currently, r-a supports limiting the number of struct fields displayed when hovering. This PR extends it to support enum variants and union fields. Since the display of these three (ADTs) is similar, this PR extends 'hover_show_structFields' to 'hover_show_adtFieldsOrVariants'. 2. This PR also resolved the problem that the layout of ADT was not restricted by display limitations when hovering on the Self type. 3. Additionally, this PR changes the default value of display limitations to `10` (instead of the original `null`), which helps users discover this feature.
internal: Don't render unknown lifetimes when rendering generic args cc rust-lang/rust-analyzer#17098
fix: Fix expression scopes not being calculated for inline consts
internal: Show workspace info in the status bar cc rust-lang/rust-analyzer#17127
…ykril fix: Fix source roots not always being created when necessary (should) fix rust-lang/rust-analyzer#17071 and fix rust-lang/rust-analyzer#17079
rustbot
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Apr 27, 2024
The job Click to see the possible cause of the failure (guessed by this bot)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @ghost
Just to see if this PR (generated by my forked josh) looks right.
@lnicola that's quite a big diff but not a lot of commits so it doesn't seem like all of history was duplicated -- does this look like a good sync?