rust-analyzer subtree update - #160426
Merged
Merged
Conversation
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.
internal: Spelling and grammar 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!
…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
Collaborator
|
cc @rust-lang/rust-analyzer |
Collaborator
Member
Author
|
@bors r+ p=1 |
Contributor
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
This was referenced Aug 4, 2026
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-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)
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@b54a82b.Created using https://github.com/rust-lang/josh-sync.
r? @ghost