rust-analyzer subtree update - #162752
Merged
Merged
rust-analyzer subtree update#162752
rust-analyzer subtree update#162752Conversation
The panic was fixed in 7fbbd2039c30fa944ec534d6f54569015b36e939, but it didn't have a test. Add a test as suggested by @A4-Tacks, based on a minimised repro I'd seen (this panic was the most common I'd seen on the latest rust-analyzer version). AI disclosure: Test code with some help by Claude Opus 5, commit message by me.
…-regression-test internal: Add regression test for 'failed to unify type errors' panic
Accidentally removed during rust-lang/rust-analyzer@492420d
Mostly thanks to FPs having gotten fixed
By not giving anon consts their own owner. This eases work and does not cause harm. I had to revert making `TypeOwnerId` lifetime'd unfortunately but it was not hard (so it won't be hard to put it back when needed).
minor: Remove some unused code
…ne_of]` When invoking the "Add missing impl members" assist.
Because it's hugely annoying.
…flow-fork minor: Do not run the "Generate lints and feature flags" CI workflow on forks
ide: fix doc comment offset calculation
We tracked the depth perfectly but didn't do anything with it. Also fix the depth tracking for expression stores (it didn't intern the new ID with an incremented depth).
..and explain the reasoning using `reason`. Sometimes `expect` wouldn't work (for _reasons_), so keep `allow` in those cases. `lsp-extensions.md` didn't need updating, as the changes in `lsp/ext.rs` only touch the `allow` attribute.
Thus getting rid of the `allow`s
- `proc-macro-api` already had a dependency on `rustc_hash`, so moving
to it in `bidirectional_protocol/msg.rs` is fine
- Note: switching to `FxHashMap` reduced the size of
`ExpandMacroResponse`, so `clippy::large_enum_variant` no longer
triggers, hence its removal.
- that required mirroring the changes to `proc-macro-srv`, and therefore
also adding the dependency to it, but it had been a transitive
dependency already anyway.
- adding the dependency to `lsp-server` is... fine
- `smol_str` only needed a hash map for a test, so adding `rustc_hash`
isn't justified
- `xtask` and `ungrammar` are dev tooling, so adding a dependency on
rustc_hash is not worth it
to show that we expect it to be unused
Support for const blocks in pattern positions was removed from rustc in rust-lang@a9442b4 Remove Pat::ConstBlock from hir-def so rust-analyzer is consistent with rustc lowering. This also fixes a panic on closure calls in const blocks. This occurred because we ended up running type inference twice on ConstBlock in some code paths. AI disclosure: Code partly written by GPT-5.6, commit message and review by me.
Example
---
```rust
{"$": ""}
```
**Before this PR**
```text
panic: Failed to make ast node `syntax::ast::generated::nodes::Name` from text `mod $;`
```
**After this PR**
```text
💡 weak: JSON syntax is not valid as a Rust item
```
internal: clean-up `allow`s
…e-infer fix: Don't support const blocks in patterns
fix: do not panic on json with invalid field name
…er_camel_case_with_raw_ident fix: correct incorrect_case suggestion for raw identifiers
…literal-panic fix: don't panic on doc comments attached to literal expressions
…er_camel_case_of_enum_variant fix: correct incorrect_case suggestion for enum variants with raw keyword name
fix: Fix `hir::Type` owner mismatches between anon consts
…mpl-with-types-from-builtin-derive-impl fix: panic when we call impls_trait for self type of builtin derive impls for generic types
Interning doesn't really need an interner since the types are global. Initially I wanted to remove *all* `DbInterner` arguments from constructors, however: 1. This is a *much* larger change. 2. We want to eventually move the types under rustc_type_ir. Then having our own constructors will need extension traits and not be comfortable, and the inherent constructors will require an interner (because rustc needs it). However empty lists do not need an interner even in rustc. Pre-interned types (`default_types()`) do, but this will likely remain under our control, and also the version without interner is a tiny bit more efficient, because the `OnceLock` closure doesn't have captures.
But do in "Implement missing members", or if the feature is enabled, or if the trait has the same feature, since it is likely to be enabled by the user. We could choose another way, to do what we do in completion: consider all non-internal features available on any nightly toolchain. However here I find this method better, since we implement many methods at once.
…nterneds internal: Remove the interner/db argument from `empty()` and `default_types()`
…ers-unstable fix: Do not fill unstable methods in "Implement default members"
Collaborator
|
cc @rust-lang/rust-analyzer |
Member
Author
|
@bors r+ p=1 rollup |
Contributor
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Sep 14, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@682a84e. Created using https://github.com/rust-lang/josh-sync. r? @ghost
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Sep 14, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@682a84e. Created using https://github.com/rust-lang/josh-sync. r? @ghost
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 14, 2026
…uwer Rollup of 11 pull requests Successful merges: - #162752 (`rust-analyzer` subtree update) - #161868 (libtest: never iterate over all tests in `--exact` mode) - #161903 (Fix initialization cycle in `target_config`) - #162240 (Garbage-collect old incremental compilation sessions) - #161675 (document that t-lang does not need involvement for unobservable intrisics) - #162630 (Simplify the `G` in `Diag<'a, G>`) - #162647 (Add regression test for previous overflow evaluating the requirement) - #162703 (regression test for valtree leaf const) - #162723 (Add regression test for unexpected type for constructor) - #162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - #162736 (clean up trivial region constraint filtering)
Contributor
|
⌛ Testing commit 62bfc83 with merge ee7ea46... Workflow: https://github.com/rust-lang/rust/actions/runs/34843707406 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 14, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@682a84e. Created using https://github.com/rust-lang/josh-sync. r? @ghost
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Sep 14, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@682a84e. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Member
|
@bors yield |
Contributor
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #162764. |
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 14, 2026
…uwer Rollup of 15 pull requests Successful merges: - #162752 (`rust-analyzer` subtree update) - #161903 (Fix initialization cycle in `target_config`) - #162240 (Garbage-collect old incremental compilation sessions) - #162610 (fix tailcall indirect return) - #162634 (Implement semantic analysis for named `Fn` trait params) - #161675 (document that t-lang does not need involvement for unobservable intrisics) - #162160 (turn aligned-in-packed error into lint) - #162504 (Stabilize `unsafe_cell_access`) - #162516 (tidy: Sort multi-line types by treating `>` as a closing bracket) - #162630 (Simplify the `G` in `Diag<'a, G>`) - #162647 (Add regression test for previous overflow evaluating the requirement) - #162703 (regression test for valtree leaf const) - #162723 (Add regression test for unexpected type for constructor) - #162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - #162736 (clean up trivial region constraint filtering)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 14, 2026
…uwer Rollup of 16 pull requests Successful merges: - #162762 (Subtree sync for rustc_codegen_cranelift) - #162752 (`rust-analyzer` subtree update) - #161903 (Fix initialization cycle in `target_config`) - #162240 (Garbage-collect old incremental compilation sessions) - #162610 (fix tailcall indirect return) - #162634 (Implement semantic analysis for named `Fn` trait params) - #161675 (document that t-lang does not need involvement for unobservable intrisics) - #162160 (turn aligned-in-packed error into lint) - #162504 (Stabilize `unsafe_cell_access`) - #162516 (tidy: Sort multi-line types by treating `>` as a closing bracket) - #162630 (Simplify the `G` in `Diag<'a, G>`) - #162647 (Add regression test for previous overflow evaluating the requirement) - #162703 (regression test for valtree leaf const) - #162723 (Add regression test for unexpected type for constructor) - #162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - #162736 (clean up trivial region constraint filtering)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 14, 2026
Rollup merge of #162752 - lnicola:sync-from-ra, r=lnicola `rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@682a84e. Created using https://github.com/rust-lang/josh-sync. r? @ghost
This file contains hidden or 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
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.
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@682a84e.Created using https://github.com/rust-lang/josh-sync.
r? @ghost