-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
⬆️ rust-analyzer
#114576
⬆️ rust-analyzer
#114576
Conversation
…the search scope by reference.
Rendering of snippet edits is deferred to places using source change
This ensures that any assist using structured snippets won't accidentally remove bits interpreted as snippet bits.
Also makes sure that stray placeholders get converted into tabstops
Structured snippets precisely track which text edits need to be marked as snippet text edits, but the cases where structured snippets aren't used but snippets are still present are for simple single text-edit changes, so it's perfectly fine to mark all one of them as being a snippet text edit
Had a missing ':' between the snippet index and placeholder text
minor: sync from downstream
…ode-to-1.75, r=lnicola vscode: change minimum VS Code version to 1.75 from 1.78 I previously mentioned [in a comment](rust-lang/rust-analyzer#15265 (comment)) that folks at my employer are on 1.78, but I was incorrect: people are on 1.75. I know this is outside the standard version support policy, but I haven't seen any of the new features in VS Code be used in rust-analyzer. The most applicable feature in those three versions of VS Code that I can find [is lazily resolving code actions](https://code.visualstudio.com/updates/v1_78#_resolve-code-action-commands-in-resolvecodeaction), but it doesn't seem like rust-analyzer is making use of that feature. (I'll be posting a PR that adds support for `$saved_file` within the next day, so feel free to bump the minimum VS Code version back to 1.78 if/when that PR lands. This just makes vendoring the _actual_ change I'm interested in a little bit easier.)
- use `str::parse()` rather than `FromStr::from_str()` - use `iter::once()` instead of constructing `Vec` for a single element
…lbasi Runnable env per platform This PR adds an option to specify runnables `env` per platform (win32, linux, etc.): ``` { "rust-analyzer.runnables.extraEnv": [ { "platform": "win32", "env": { "SCITER_BIN_FOLDER": "C:\\Projects\\3rd\\sciter-js-sdk\\bin\\windows\\x64", } }, { "platform":["linux","darwin"], "env": { "SCITER_BIN_FOLDER": "/home/vit/Projects/sciter/sciter-js-sdk/bin/linux/x64", } } ] } ```
Properly infer types with type casts This PR reenables `Expectation::Castable` (previous attempt at rust-lang#14104, reverted by rust-lang#14120) and implements type cast checks, which enable us to infer a bit more. Castable expectations are relatively weak -- they only influence the inference if we cannot infer the types by other means. Therefore, we need to defer possible type unification with the casted type until we type check all expressions of the body. This PR adds a struct and slots in `InferenceContext` for the deferred cast checks (c.f. [`CastCheck`] in `rustc_hir_typeck`). I only implemented the bits that affect the inference result. It should be possible to return type adjustments for well-formed casts and report diagnostics for invalid casts, but I'm leaving them for future work for now. Fixes rust-lang#11571 Fixes rust-lang#15246 [`CastCheck`]: https://github.com/rust-lang/rust/blob/da1d099f91ea387a2814a6244dd875a2048b486f/compiler/rustc_hir_typeck/src/cast.rs#L55
…r=lnicola Show anonymous fn def type as a fn pointer in source code Fixes rust-lang#15346 The second commit is an unrelated change. I can remove it if not desired.
Improve mir interpreter performance by caching
Previously, clicking 'rust-analyzer' would stop the server entirely. This was easy to do accidentally, and then the user has to wait for the server to start up again.
If the rust-analyzer server isn't running, we can't do much. Treat this state as a warning color, so it's more obvious.
Set the default status bar action to openLogs Previously, clicking 'rust-analyzer' would stop the server entirely. This was easy to do accidentally, and then the user has to wait for the server to start up again.
SCIP requires symbols to be unique, but multiple functions may have a parameter with the same name. Qualify parameters according to the containing function.
SCIP: Qualify parameters by the containing function SCIP requires symbols to be unique, but multiple functions may have a parameter with the same name. Qualify parameters according to the containing function.
Use the warning color when rust-analyzer is stopped If the rust-analyzer server isn't running, we can't do much. Treat this state as a warning color, so it's more obvious.
…ait, r=lnicola fix: Remove unwraps from "Generate delegate trait" Fixes rust-lang#15388 This is untested and purely mechanical, maybe some of those `unwrap`s actually made sense, but it probably doesn't hurt to avoid them.
internal: Turn unresolved proc macro expansions into missing expressions Reduces the amount of type related errors one gets when proc macro expansion is disabled.
Also don't provide the assist when the `Default` trait can't be found.
…r=lnicola Don't provide `generate_default_from_new` when impl self ty is missing Also don't provide the assist when the `Default` trait can't be found. Part of rust-lang#15398
Some changes occurred in src/tools/rust-analyzer cc @rust-lang/rust-analyzer |
@bors r+ p=1 |
☀️ Test successful - checks-actions |
adds the list of contributors to the template. the contributors are: enselic, ralfjung, trolldemorted, matthiaskrgr, ttsugriy, kobzol, and lnicola. this commit updates `example.md` by adding the contributors to the list. the changes can be seen in the diff: ```diff diff --git a/templates/example.md b/templates/example.md index a12803718a3e..da0ecc84c0c6 100644 --- a/templates/example.md +++ b/templates/example.md @@ -10,3 +10,16 @@ - [ci: do not hide error logs in a group](rust-lang/rust#114573) - [:arrow_up: `rust-analyzer`](rust-lang/rust#114576) - [rollup of 9 pull requests](rust-lang/rust#114585) + +### contributors + +- [enselic](https://github.com/enselic) +- [enselic](https://github.com/enselic) +- [ralfjung](https://github.com/ralfjung) +- [trolldemorted](https://github.com/trolldemorted) +- [matthiaskrgr](https://github.com/matthiaskrgr) +- [matthiaskrgr](https://github.com/matthiaskrgr) +- [ttsugriy](https://github.com/ttsugriy) +- [kobzol](https://github.com/kobzol) +- [lnicola](https://github.com/lnicola) +- [matthiaskrgr](https://github.com/matthiaskrgr) ```
Finished benchmarking commit (139b49b): 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)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 652.069s -> 652.316s (0.04%) |
r? @ghost