Skip to content

Rollup of 34 pull requests - #158337

Closed
jhpratt wants to merge 190 commits into
rust-lang:mainfrom
jhpratt:rollup-dCmTYml
Closed

Rollup of 34 pull requests#158337
jhpratt wants to merge 190 commits into
rust-lang:mainfrom
jhpratt:rollup-dCmTYml

Conversation

@jhpratt

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

Voultapherand others added 30 commits April 24, 2026 14:59
Implement a rust-analyzer VS Code command for creating new Cargo
projects from the editor. Add command registration, UI entry points,
configuration for post-create behavior, focused validation, and tests for
the command flow.
AI tools were used to research comparable editor behaviors and help
refine the implementation plan; the resulting changes were reviewed
before submission.
When an index expression with an ambiguous type (e.g. `arr[idx.into()]`)
appears inside a cast or binary operation, the type inference error was
incorrectly attributed to the outer expression instead of the `.into()`
call. Resolve the index sub-expression type first so the error points at
the actual ambiguous site.
Point the new project failure flow at the extension logs and make the
log-opening command available when the language server is not running.
Also add tests for the env-aware cargo path resolution path introduced
for project creation.
Run the VS Code formatter to fix the remaining Prettier issue in the
launch config test before updating rust-lang/rust-analyzer#22103.
AI-assisted: OpenAI Codex was used to identify and apply this change.
Handle Windows executable suffixes when the VS Code extension probes
for cargo through PATH or CARGO_HOME, and preserve case-insensitive
environment variable lookup for supplied env objects so copied Windows
`Path` entries still resolve cargo.
Normalize and document the Windows CARGO_HOME test comparison as well,
because VS Code path resolution can lowercase the drive letter in
`fsPath` without changing which executable was found.
This keeps the extension-side lookup aligned with the Rust-side
toolchain helper behavior and avoids breaking create-project on common
Windows setups.
AI-assisted: OpenAI Codex was used to identify and apply this change.
…as_adt_def
Make assist `inline_type_alias` work on ADT definitions
Example
---
```json
{
"rust-analyzer.completion.autoimport.exclude": [
{"path": "xxx_crate::Foo", "type": "variants"},
]
}
```
```rust
enum Foo {
Variant1,
Variant2,
}
fn main() {
V$0
}
```
**Before this PR**
```
ev TupleV(…) TupleV(u32)
ev Variant1 (use Foo::Variant1) Variant1
ev Variant2 (use Foo::Variant2) Variant2
bt u32 u32
```
**After this PR**
```
ev TupleV(…) TupleV(u32)
bt u32 u32
```
Example
---
```rust
macro_rules! m { ($i:expr) => { $i } }
fn f() {
let xyz = 0;
m!(xyz$0);
}
```
**Before this PR**
Assist not applicable
**After this PR**
```rust
macro_rules! m { ($i:expr) => { $i } }
fn f() {
m!(0);
}
```
Example
---
```rust
macro_rules! i { ($($t:tt)*) => { $($t)* } }
fn f() {
i!(let xyz = 0;);
_ = xyz$0;
_ = xyz;
}
```
**Before this PR**
```
request handler panicked: can't resolve SyntaxNodePtr { kind: LET_STMT, range: 0..9 } with SOURCE_FILE@0..108
```
**After this PR**
```rust
macro_rules! i { ($($t:tt)*) => { $($t)* } }
fn f() {
i!(let xyz = 0;);
_ = 0;
_ = xyz;
}
```
…lysis-bench-removed
Remove docs about removed `analysis-bench` command
In c0f428d55b425c8ba18039a3687cdcdc47e111d1 this
code was adjusted to handle a change in
`load_workspace`.
The change assumed that the `ra-rustc-test` folder
existed in the `std::env::temp_dir`, but this
assumption is not always correct.
This updates the rust-version file to 485ec3f.
…ate-dir-for-cargo-xtask-metrics-rustc_tests
Create directory for `cargo xtask metrics rustc_tests`
…ypqwmmp
Fix destructuring assignments not introducing moves
The region-constraint machinery for `-Zassumptions-on-binders` is
region-outlives-only. A non-lifetime binder (`for<T>`) introduces a
placeholder type in the binder's universe `u`. The rewrite that pulls
constraints out of `u` only folds regions (`PlaceholderReplacer` just
implements `fold_region`), so an alias-outlives constraint such as
`<!T as Trait>::Assoc: 'r` reaches
`pull_region_outlives_constraints_out_of_universe` still in `u` and
trips `assert!(max_universe < u)`.
Report ambiguity for those constraints instead of asserting, matching
the existing `None => Ambiguity` bail-outs in this module. The goal
then surfaces as an ordinary ambiguity error rather than an ICE.
@rustbotrustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` PG-exploit-mitigations Project group: Exploit mitigations 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 24, 2026
@jhpratt

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bf43eff has been approved by jhpratt

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 Jun 24, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

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-2,x86_64-gnu-nopt

@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 34 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-2
try-job: x86_64-gnu-nopt
@rust-borsrust-borsBot 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 Jun 24, 2026
@rust-bors

rust-borsBot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

This rollup was thus unapproved.

@rust-bors

rust-borsBot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

PR #158257, which is a member of this rollup, was closed.

This rollup was closed.

@rustbotrustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 24, 2026
@jhpratt
jhpratt deleted the rollup-dCmTYml branch June 24, 2026 04:41
@rust-bors

rust-borsBot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f587be6 (f587be6a20063458d2b7a8331860c65d8e64f873)
Base parent: f28ac76 (f28ac764c36004fa6a6e098d15b4016a838c13c6)

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

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-CIArea: Our Github Actions CIA-metaArea: Issues & PRs about the rust-lang/rust repository itselfA-testsuiteArea: The testsuite used to check the correctness of rustcF-explicit_tail_calls`#![feature(explicit_tail_calls)]`PG-exploit-mitigationsProject group: Exploit mitigationsrollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-clippyRelevant to the Clippy team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.T-rust-analyzerRelevant to the rust-analyzer team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

19 participants

@jhpratt@JonathanBrouwer@rustbot@Voultapher@joshka@Dnreikronos@A4-Tacks@itang06@WeiTheShinobi@ChayimFriedman2@Hoverbear@lnicola@Veykril@bit-aloo@dfireBird@ldgabbay@tilladam@eihqnh@HuaGu-Dragon