Skip to content

rust-analyzer subtree update#158315

Open
lnicola wants to merge 97 commits into
rust-lang:mainfrom
lnicola:sync-from-ra
Open

rust-analyzer subtree update#158315
lnicola wants to merge 97 commits into
rust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola

@lnicola lnicola commented Jun 23, 2026

Copy link
Copy Markdown
Member

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

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

r? @ghost

joshka and others added 30 commits May 15, 2026 01:03
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.
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.
fix: rename schema subItems with sub_items
…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
```
feat: support flyimport exclude variants
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
internal: git ignore .vim/coc-settings.json
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
…act-module-syntax-editor

internal: migrate extract_module to SyntaxEditor
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 23, 2026
`rust-analyzer` subtree update

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

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

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

Rollup of 23 pull requests

Successful merges:

 - #158315 (`rust-analyzer` subtree update)
 - #155739 (Add temporary scope to assert_eq and assert_ne)
 - #156885 (Fix misattributed type inference error span for index expressions)
 - #157271 (simplify some `proc_macro` things)
 - #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
 - #157921 (trait solver: Resolve region vars in max universe)
 - #157960 (delegation: add support for infers in generics)
 - #157983 (Lift the same-signature restriction for `extern "tail"`)
 - #158105 (Extract all instance shim variants into new `ShimKind` enum)
 - #158207 (Resolver: local/external split of  `resolve_ident_in_module_non_globs_unadjusted` )
 - #158279 (Follow goto and drop when linting unreachable code)
 - #157527 (Move derive tests into their dedicated folder)
 - #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
 - #158020 (Update mingw-w64 C toolchain)
 - #158222 (format: ignore println newline in foreign format hints)
 - #158223 (Move target checking for #[lang] to the attribute parser)
 - #158252 (Use `cfg_select` in `std::os`)
 - #158257 ( fix escaping placeholder check in next solver normalization folder)
 - #158263 (Only load the feature list once in the entire resolver)
 - #158274 (triagebot: Stop pinging myself)
 - #158282 (slice_split_once: bounds check optimization note)
 - #158300 (Improve unknown crate_type diagnostic suggestions)
 - #158304 (mailmap: update mu001999)

Failed merges:

 - #158256 (Avoid parser panics bubbling out to proc macros)
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 23, 2026
`rust-analyzer` subtree update

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

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

r? @ghost
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 23, 2026
@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0a145c7 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  TOOLSTATE_PUBLISH: 1
  IMAGE: aarch64-gnu
##[endgroup]
    Updating crates.io index
error: failed to get `time-macros` as a dependency of package `time v0.3.38`
    ... which satisfies dependency `time = "^0.3.16"` of package `cookie_store v0.21.1`
    ... which satisfies dependency `cookie_store = "^0.21.1"` of package `ureq v3.0.8`
    ... which satisfies dependency `ureq = "^3"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `time-macros`

Caused by:

@jhpratt

jhpratt commented Jun 24, 2026

Copy link
Copy Markdown
Member

@bors retry

@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 Jun 24, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 24, 2026
`rust-analyzer` subtree update

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

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

r? @ghost
rust-bors Bot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 27 pull requests

Successful merges:

 - #158315 (`rust-analyzer` subtree update)
 - #155739 (Add temporary scope to assert_eq and assert_ne)
 - #156885 (Fix misattributed type inference error span for index expressions)
 - #157271 (simplify some `proc_macro` things)
 - #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
 - #157921 (trait solver: Resolve region vars in max universe)
 - #157960 (delegation: add support for infers in generics)
 - #157983 (Lift the same-signature restriction for `extern "tail"`)
 - #158053 (Optimize network address parser)
 - #158105 (Extract all instance shim variants into new `ShimKind` enum)
 - #158207 (Resolver: local/external split of  `resolve_ident_in_module_non_globs_unadjusted` )
 - #158279 (Follow goto and drop when linting unreachable code)
 - #157527 (Move derive tests into their dedicated folder)
 - #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
 - #158020 (Update mingw-w64 C toolchain)
 - #158039 (c-variadic: test that we use equality up to free lifetimes)
 - #158222 (format: ignore println newline in foreign format hints)
 - #158223 (Move target checking for #[lang] to the attribute parser)
 - #158252 (Use `cfg_select` in `std::os`)
 - #158257 ( fix escaping placeholder check in next solver normalization folder)
 - #158263 (Only load the feature list once in the entire resolver)
 - #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
 - #158274 (triagebot: Stop pinging myself)
 - #158282 (slice_split_once: bounds check optimization note)
 - #158300 (Improve unknown crate_type diagnostic suggestions)
 - #158304 (mailmap: update mu001999)
 - #158309 (Update `rustc-literal-escaper` version to `0.0.8`)

Failed merges:

 - #158256 (Avoid parser panics bubbling out to proc macros)
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 24, 2026
`rust-analyzer` subtree update

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

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

r? @ghost
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 39859f0 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  DEPLOY: 1
  IMAGE: dist-ohos-aarch64
##[endgroup]
    Updating crates.io index
error: failed to get `askama_derive` as a dependency of package `askama_macros v0.16.0`
    ... which satisfies dependency `askama_macros = "=0.16.0"` of package `askama v0.16.0`
    ... which satisfies dependency `askama = "^0.16.0"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `askama_derive`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of as/ka/askama_derive failed

Caused by:
  curl failed

Caused by:

@jhpratt

jhpratt commented Jun 24, 2026

Copy link
Copy Markdown
Member

@bors treeclosed=5

@bors retry

@rust-bors

rust-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Tree closed for PRs with priority less than 5.

@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 Jun 24, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 24, 2026
`rust-analyzer` subtree update

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

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

r? @ghost
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.