Skip to content

rust-analyzer subtree update - #160426

Merged
rust-bors[bot] merged 102 commits into
rust-lang:mainfrom
lnicola:sync-from-ra
Aug 5, 2026
Merged

rust-analyzer subtree update#160426
rust-bors[bot] merged 102 commits into
rust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola

@lnicola lnicola commented Aug 3, 2026

Copy link
Copy Markdown
Member

Subtree update of rust-analyzer to rust-lang/rust-analyzer@b54a82b.

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

r? @ghost

ChayimFriedman2 and others added 30 commits May 6, 2026 23:50
But only if the source is code passed to the macro, not code inside the macro.
With `#[allow(rust_analyzer::inactive_code)]`.
Currently JsonLinesParser::from_line is called for both stdout and
stderr, so trait implementers cannot distinguish stdout and stderr.

Define a separate JsonLinesParser::from_stderr_line to make the
stdout/stderr distinction explicit, and update use sites. This is not
a behaviour change.

AI disclosure: Partially written by Codex and GPT-5.5.
…lens

fix: Respect `references.exclude[Tests/Imports]` in references lens
feat: Support inactive-code diagnostic in macros
Previously we read both stdout and stderr in the discover
protocol. Depending on the tool generating rust-project JSON, this
meant that a single stderr log message could break discovery.

Instead, only look for JSON from the discover command's stdout, and
forward stderr to the rust-analyzer logs.

Update both the implementation and the discover protocol docs to
reflect this behaviour.

AI disclosure: Code partly written by GPT-5.5.
fix: Discover protocol should only parse stdout
fix: resolve path on all namespace on resolve_path
I noticed a few "its" versus "it's" grammatical issues, so I've done a
pass at fixing obvious grammar issues.

AI disclosure: I fixed the first few manually, then asked GPT-5.5 to
look for additional cases and kept all the obviously reasonable fixes.
…4-unicode-progress-report

fix: make analysis-stats progress bar Unicode-safe
…_a_discriminant_type_larger_than_typeck_s

fix: don't pick a discriminant type larger than typeck's
…c_on_a_qualified_path_whose_trait_is_not_a_trait

fix: don't panic on a qualified path whose trait is not a trait
SemanticsImpl::find_file assumes that its caches always contain the file that
has the current SyntaxNode.

For macros `foo!()` we only have two files to worry about: the macro
call site and the macro definition site. Hoewver, for
include!("foo.rs") we also need to consider the included file.

Ensure that the file cache is consistently populated for include!()
invocations macro expansion, and add a test.

AI disclosure: GPT-5.5 used to minimise a repro from a real project
and write the initial implementation. Comments and commit message are
entirely mine.
…uded-file

fix: Failed to lookup MACRO_CALL@... in this Semantics due to include!
Musteab and others added 13 commits August 2, 2026 16:03
…nts-detection

fix: detect the rust-analyzer component in a multi-line components array
Example
---
```rust
fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_ar$0
}
```

**Before this PR**

```rust
fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_arg(${1:x});$0
}
```

**After this PR**

```rust
fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_arg(${1:&x});$0
}
```
Example
---
**Before this PR**

```text
EXPR_STMT
  CLOSURE_EXPR
    PARAM_LIST
      PIPE "|"
      PIPE "|"
    RANGE_EXPR
      LITERAL
        INT_NUMBER "1"
      DOT2 ".."
      WHITESPACE " "
      ERROR
        DOT "."
EXPR_STMT
  CALL_EXPR
    PATH_EXPR
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "method"
```

**After this PR**

```rust
METHOD_CALL_EXPR
  CLOSURE_EXPR
    PARAM_LIST
      PIPE "|"
      PIPE "|"
    RANGE_EXPR
      LITERAL
        INT_NUMBER "1"
      DOT2 ".."
  WHITESPACE " "
  DOT "."
  NAME_REF
    IDENT "method"
```
Example
---
```rust
enum E { A$0 = {} }
```

**Before this PR**

```rust
A = BlockExpr(BlockExpr { syntax: BLOCK_EXPR@29..31 })
```

**After this PR**

```rust
A = {}
```
Escape keywords when used as module names
Display modules with non-identifier names using #[path = "..."] syntax
Correctly Handle Unlinked Module Edge Cases
minor: variant eval error use source instead of node debug
…sitor

internal: Do not  store references in `ExprScope`'s visitor
…-parse

fix: parse postfix range inside closure in access
fix: add reference for same name param coerce matches
@rustbot

rustbot commented Aug 3, 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 Aug 3, 2026
@rustbot

rustbot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@lnicola

lnicola commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=1

@rust-bors

rust-bors Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 382d5d4 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 Aug 4, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 4, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@b54a82b.

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

r? @ghost
rust-bors Bot pushed a commit that referenced this pull request Aug 5, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #160426 (`rust-analyzer` subtree update)
 - #160372 (Derive the allocator used by tools from rustc's allocator)
 - #146882 (fully deprecate the legacy integral modules)
 - #158727 (std: use `readdir` on nearly all UNIX platforms)
 - #159727 (Various steps in moving away from the big reflection enum to reflection functions)
 - #160443 (normalize in relations, not generalize, when relating infer with alias)
 - #160457 (implement -Zllvm-target-feature)
 - #160480 (Single-pass ASCII lower/upper case conversion)
 - #160502 (Reduce number of miri tests executed on PR CI)
 - #157430 (std::random: use little-endian for reproducibility)
 - #158110 (fix macro attribute feature-gate span)
 - #159975 (Use real ThinVec in StmtDebugInfos)
 - #160001 (Suggest mutable method when iterating over binding)
 - #160024 (Fix mono reachability with no-op landing pads)
 - #160154 (Add regression test for HRTB associated type projection closure)
 - #160176 (No more `tests/ui/issues`!)
 - #160326 (Remove hidden_glob_reexports)
 - #160407 (Add regression tests for a number of ICEs and diagnostics issues labelled `E-needs-test`)
 - #160430 (bootstrap: Don't produce mutated/filtered PathSets during command-line matching)
 - #160472 (Minor fixes to `core::io` & `alloc::io` Documentation)
 - #160486 (Remove unused `FreeRegionsVisitor`)
 - #160496 (clarify non-determinism docs for algebraic operations)

Failed merges:

 - #160501 (Add bootstrap CLI snapshot test for testing miri)
@rust-bors
rust-bors Bot merged commit 8a7446c into rust-lang:main Aug 5, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 5, 2026
rust-timer added a commit that referenced this pull request Aug 5, 2026
Rollup merge of #160426 - lnicola:sync-from-ra, r=lnicola

`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@b54a82b.

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

r? @ghost
RalfJung pushed a commit to rust-lang/miri that referenced this pull request Aug 5, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#160426 (`rust-analyzer` subtree update)
 - rust-lang/rust#160372 (Derive the allocator used by tools from rustc's allocator)
 - rust-lang/rust#146882 (fully deprecate the legacy integral modules)
 - rust-lang/rust#158727 (std: use `readdir` on nearly all UNIX platforms)
 - rust-lang/rust#159727 (Various steps in moving away from the big reflection enum to reflection functions)
 - rust-lang/rust#160443 (normalize in relations, not generalize, when relating infer with alias)
 - rust-lang/rust#160457 (implement -Zllvm-target-feature)
 - rust-lang/rust#160480 (Single-pass ASCII lower/upper case conversion)
 - rust-lang/rust#160502 (Reduce number of miri tests executed on PR CI)
 - rust-lang/rust#157430 (std::random: use little-endian for reproducibility)
 - rust-lang/rust#158110 (fix macro attribute feature-gate span)
 - rust-lang/rust#159975 (Use real ThinVec in StmtDebugInfos)
 - rust-lang/rust#160001 (Suggest mutable method when iterating over binding)
 - rust-lang/rust#160024 (Fix mono reachability with no-op landing pads)
 - rust-lang/rust#160154 (Add regression test for HRTB associated type projection closure)
 - rust-lang/rust#160176 (No more `tests/ui/issues`!)
 - rust-lang/rust#160326 (Remove hidden_glob_reexports)
 - rust-lang/rust#160407 (Add regression tests for a number of ICEs and diagnostics issues labelled `E-needs-test`)
 - rust-lang/rust#160430 (bootstrap: Don't produce mutated/filtered PathSets during command-line matching)
 - rust-lang/rust#160472 (Minor fixes to `core::io` & `alloc::io` Documentation)
 - rust-lang/rust#160486 (Remove unused `FreeRegionsVisitor`)
 - rust-lang/rust#160496 (clarify non-determinism docs for algebraic operations)

Failed merges:

 - rust-lang/rust#160501 (Add bootstrap CLI snapshot test for testing miri)
@lnicola
lnicola deleted the sync-from-ra branch August 5, 2026 06:57
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.