-
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
⬆️ rust-analyzer #105855
⬆️ rust-analyzer #105855
Conversation
Support `rustc_has_incoherent_inherent_impls` Fixes us not resolving `<dyn Error>::downcast` now that `Error` moved to core, while that assoc function is declared in `alloc`.
The old value was for the old chalk-engine solver, nowadays the newer chalk-recursive solver is used. The new solver currently uses fuel a bit more quickly, so a higher value is needed. Running analysis-stats showed that a value of 100 increases the amount of unknown types, while for a value of 1000 it's staying mostly the same.
Update to Chalk 88 This Chalk release introduces fuel for the recursive solver ([chalk#774](rust-lang/chalk#774)). I'm not sure how often it calls `should_continue` compared to the other solver, so we might want to increase `CHALK_SOLVER_FUEL`, the current default value of 100 might be too low. This should fix a lot of hangs and crashes, for example this solves the hang in rust-lang#12897.
Macro2's generally don't have derive helpers, but currently builtin derive macros are declared with macro2 syntax, which can have derive helpers.
…r=Veykril Support builtin derive macro helper attributes Closes rust-lang#13244 It's a bit wasteful for `Macro2Data` to have `helpers` field currently just for `Default` derive macro, but I tend to think it's okay for the time being given how rare macro2's are used.
Compute data layout of types cc rust-lang#4091 Things that aren't working: * Closures * Generators (so no support for `Future` I think) * Opaque types * Type alias and associated types which may need normalization Things that show wrong result: * ~Enums with explicit discriminant~ * SIMD types * ~`NonZero*` and similar standard library items which control layout with special attributes~ At the user level, I didn't put much work, since I wasn't confident about what is the best way to present this information. Currently it shows size and align for ADTs, and size, align, offset for struct fields, in the hover, similar to clangd. I used it some days and I feel I liked it, but we may consider it too noisy and move it to an assist or command.
Add VS Code schema validation for `rust-project.json` Now that SchemaStore/schemastore#2628 has been merged, adding the `jsonValidation` contribution to the VS Code extension for better editor support when modifying `rust-project.json` files. Related issue: rust-lang#13714
feat: Add "Remove redundant parentheses" assist ![Peek 2022-12-08 22-22](https://user-images.githubusercontent.com/38225716/206542898-d6c97468-d615-4c5b-8650-f89b9c0321a0.gif) Can be quite handy when refactoring :)
Show type info on hover of enum variant fields Small addition to rust-lang/rust-analyzer#13490
…Veykril fix: unescape inline module names in module resolution Fixes rust-lang#13884
…ite, r=lnicola minor: Make `qualify_method_call` `RefactorRewrite` See rust-lang/rust-analyzer#13825 (comment)
Rename `checkOnSave` settings to `check` Now that flychecks can be triggered without saving the setting name doesn't make that much sense anymore. This PR renames it to just `check`, but keeps `checkOnSave` as the enabling setting.
Make it clearer when the server expects an initialized notification
Use ANSI control characters to display text decorations matching the VScode terminal theme, and strip them out when providing text content for rustc diagnostics. This adds the small `anser` library to parse the control codes, and it also supports HTML output so it should be fairly easy to switch to a rendered HTML/webview implementation if desired.
…ler-diagnostics, r=ian-h-chamberlain Colorize `cargo check` diagnostics in VSCode via text decorations Fixes rust-lang#13648 ![colored-rustc-diagnostics](https://user-images.githubusercontent.com/11131775/209479884-10eef8ca-37b4-4aae-88f7-3591ac01b25e.gif) Use ANSI control characters to display text decorations matching the VScode terminal theme, and strip them out when providing text content for rustc diagnostics. This adds the small [`anser`](https://www.npmjs.com/package/anser) library (MIT license, no dependencies) to parse the control codes, and it also supports HTML output so it should be fairly easy to switch to a rendered HTML/webview implementation in the future I also updated the default `cargo check` command to use the rendered ANSI diagnostics, although I'm not sure if it makes sense to put this kind of thing behind a feature flag, or whether it might have any issues on Windows (as I believe ANSI codes are not used for colorization there)?
Is there a particular time/day I should redo this pull? It's probably outdated now... |
@arcnmx between now and next Monday (inclusive) might be a good time. There were quite a few changes merged in the past couple of days. Sorry for the delay here. |
Merge commit '368e0bb32f1178cf162c2ce5f7e10b7ae211eb26'
afe409b
to
06e705f
Compare
@lnicola updated, poke me if needed again later |
Freeze until the r-a side has been synced if I understand the subtree stuff correctly right? |
☀️ Test successful - checks-actions |
Finished benchmarking commit (3254bef): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
CyclesThis benchmark run did not return any relevant results for this metric. |
Updates rust-analyzer to rust-lang/rust-analyzer@368e0bb
This is a continuation/replacement of #105834, close that if this is chosen instead.