Skip to content

Rollup of 14 pull requests - #160507

Closed
JonathanBrouwer wants to merge 147 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rEGiq6Z
Closed

Rollup of 14 pull requests#160507
JonathanBrouwer wants to merge 147 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rEGiq6Z

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

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)]`.
See added comment for rationale. Also note that `rand` has defaulted to
LE for many years, apparently without any objections.
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
When encountering a for loop that requires a mutable iterator item, we previously suggested changing the method on the iterated expression, but ignored bindings. We now go to the binding's definition and suggest changing the method there too.

```
error[E0594]: cannot assign to `v.v`, which is behind a `&` reference
  --> $DIR/suggest-mut-method-for-loop-hashmap.rs:31:9
   |
LL |     for (_k, v) in x {
   |                    - this iterator yields `&` references
...
LL |         v.v += 1;
   |         ^^^^^^^^ `v` is a `&` reference, so it cannot be written to
   |
help: use mutable method
   |
LL |     let mut x = map.iter_mut();
   |                         ++++
```
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!
@rustbot rustbot added O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 4, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ p=3

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c121f54 has been approved by JonathanBrouwer

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 10. This pull request will be tested once the tree is reopened.

Reason for tree closure: manually handling queue due to backlog

@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
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
Rollup of 14 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - arch (line 282) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - core_arch::arch (line 246) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - core_arch::arch (line 59) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/mod.rs - core_arch::arch::wasm32 (line 158) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/nvptx/mod.rs - core_arch::nvptx::vprintf (line 160) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128 (line 89) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128d (line 136) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128i (line 42) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m256 (line 234) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m256d (line 281) ... ignored

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 4, 2026
@rust-bors

rust-bors Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR #159014, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 4, 2026
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 4, 2026
@rust-bors

rust-bors Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 45047bc failed: CI. Failed job:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-hermit Operating System: Hermit O-linux Operating system: Linux O-netbsd Operating system: NetBSD O-redox Operating system: Redox, https://www.redox-os.org/ O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.