-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
#125272
Subtree update of rust-analyzer
#125272
Conversation
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": "[email protected]" } } ``` 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">
Chore: Fix some typos rust-lang#124948 > In RA we gladly take typo fixes, but for now we definitely want them in the upstream repository.
internal: Add StaticLifetime to hir API
Correct Neovim 0.10 inlay hints config example This change is what I had to do to make inlay hints work on Neovim 0.10. The current example produces errors about wrong argument type to `.enable()`.
internal: 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 |
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. |
@bors r+ |
@bors p=1 subtree update |
Yeah nothing stands out, and I assume the round-trip check during Welcome to the josh-proxy club. :) |
☀️ Test successful - checks-actions |
Finished benchmarking commit (7d2a95b): 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 (primary 2.2%)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: 669.294s -> 672.046s (0.41%) |
r? @ghost