-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Subtree update of rust-analyzer
#132314
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
#132314
Conversation
Because our lint infra *can* handle allows from within macro expansions! (Also, what did this reason have to do with something that is a hard error and not a lint? I'm puzzled). I wonder how many such diagnostics we have... Maybe that also mean we can change `unused_mut` to no-longer-experimental? But this is a change I'm afraid to do without checking.
Instead of lowering them to `<expr> = <expr>`, then hacking on-demand to resolve them, we lower them to `<pat> = <expr>`, and use the pattern infrastructure to handle them. It turns out, destructuring assignments are surprisingly similar to pattern bindings, and so only minor modifications are needed. This fixes few bugs that arose because of the non-uniform handling (for example, MIR lowering not handling slice and record patterns, and closure capture calculation not handling destructuring assignments at all), and furthermore, guarantees we won't have such bugs in the future, since the programmer will always have to explicitly handle `Expr::Assignment`. Tests don't pass yet; that's because the generated patterns do not exist in the source map. The next commit will fix that.
And few more fixups. I was worried this will lead to more memory usage since `ExprOrPatId` is double the size of `ExprId`, but this does not regress `analysis-stats .`. If this turns out to be a problem, we can easily use the high bit to encode this information.
… struct definition
…e links to respective struct
feat: goto definition on range operators Closes rust-lang#18342
…Veykril Fix status bar message not being marked markdown Closes rust-lang/rust-analyzer#18323
Also lower them a bit more
…Veykril fix: Fix incorrect parsing of use bounds Fixes rust-lang/rust-analyzer#18357
feat: render docs from aliased type when type has no docs Trying to close rust-lang#18344 - [x] ~Find the docs by traversing upwards if the type itself has none but aliasing for another type that might have.~ - [x] Show docs from aliased type. - [x] Showing description that we are displaying documentation for different definition in hover box. 
…macros, r=lnicola tests: Add `lsif_contains_generated_constant` test Closes rust-lang/rust-analyzer#18309
feat: resolve range patterns to their structs Closes rust-lang#18367
Switch CI from bors to merge queues
…nxqu internal: Merge separate inlay hints targeting same range
I.e. the following situation: ``` fn foo() { mod bar { fn qux() { // Prelude path here (e.g. macro use prelude or extern prelude). } } } ``` Those were previously unresolved, because, in order to support `self` and `super` properly, since rust-lang#15148 we do not ascend block paths when there is a module in between, but only crate def maps register preludes, not block def maps, and we can't change this because block def map prelude can always be overridden by another block. E.g. ``` fn foo() { struct WithTheSameNameAsPreludeItem; { WithTheSameNameAsPreludeItem } } ``` Here `WithTheSameNameAsPreludeItem` refer to the item from the top block, but if we would register prelude items in each block the child block would overwrite it incorrectly.
internal: Stop producing .gz artifacts for Windows
Start using `Option::is_none_or`
…e-map internal: Build source map for `hir_def::TypeRef`s
Report document symbols of kind `variable` for let statements
fix: Properly resolve prelude paths inside modules inside blocks
…xport fix: Allow public re-export of `extern crate` import
Move text-edit into ide-db
feat: Support `cfg(true)` and `cfg(false)`
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 sync |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c8a8c82): 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 5.1%)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: 783.928s -> 783.219s (-0.09%) |
r? @ghost