Skip to content

rust-analyzer subtree update - #162752

Merged
rust-bors[bot] merged 38 commits into
rust-lang:mainfrom
lnicola:sync-from-ra
Sep 14, 2026
Merged

rust-bors[bot] merged 38 commits into
rust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola

@lnicola lnicola commented Sep 14, 2026

Copy link
Copy Markdown
Member

Subtree update of rust-analyzer to rust-lang/rust-analyzer@682a84e.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost

Aditya-PS-05 and others added 30 commits September 6, 2026 02:22
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
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).
…ne_of]`

When invoking the "Add missing impl members" assist.
…flow-fork

minor: Do not run the "Generate lints and feature flags" CI workflow on forks
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
```
…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"
@rustbot

rustbot commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Sep 14, 2026
@lnicola

lnicola commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=1 rollup

@rust-bors

rust-bors Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 62bfc83 has been approved by lnicola

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 14, 2026
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)
@rust-bors

rust-bors Bot commented Sep 14, 2026

Copy link
Copy Markdown
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
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors yield
Yielding to enclosing rollup

@rust-bors

rust-bors Bot commented Sep 14, 2026

Copy link
Copy Markdown
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
rust-bors Bot merged commit 32c397b into rust-lang:main Sep 14, 2026
13 of 14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 14, 2026
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
@lnicola
lnicola deleted the sync-from-ra branch September 14, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.