Skip to content

rust-analyzer subtree update#157599

Merged
rust-bors[bot] merged 52 commits into
rust-lang:mainfrom
lnicola:sync-from-ra
Jun 8, 2026
Merged

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

Conversation

@lnicola

@lnicola lnicola commented Jun 8, 2026

Copy link
Copy Markdown
Member

Subtree update of rust-analyzer to rust-lang/rust-analyzer@57116fa.

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

r? @ghost

Veykril and others added 30 commits June 1, 2026 11:17
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Example
---
**Before this PR**

```rust
async fn test_async(foo: i32, _: i32) {}
fn main() {
    test_async(1, 2)
             //^ foo
                //^ <ra@gennew>0
```

**After this PR**

```rust
async fn test_async(foo: i32, _: i32) {}
fn main() {
    test_async(1, 2)
             //^ foo
```
…rs" assist

I also made some changes to lang items, which turned out not needed but I think they're useful too, maybe in the future or maybe ot outside projects.
fix: Do not fill both `drop()` and `pin_drop()` in the "fill missing members" assist
…ant ID / tuple ID needed)

bring back env for projection_ty
cleanups
As of writing, this is still rejected by rustc at a later stage.
Example
---
```rust
struct Foo<T, const N: usize>([T; N]);

impl<T, const N: usize> F$0oo<T, N> {
    fn spec_len(&self) -> usize {
        N
    }
}
```

**Before this PR**

```rust
struct Foo<T, const N: usize>([T; N]);

trait SpecLen<T, const N: usize> {
    fn spec_len(&self) -> usize;
}

impl<T, const N: usize> SpecLen<T, N> for Foo<T, N> {
    fn spec_len(&self) -> usize {
        N
    }
}
```

**After this PR**

```rust
struct Foo<T, const N: usize>([T; N]);

trait SpecLen {
    fn spec_len(&self) -> usize;
}

impl<T, const N: usize> SpecLen for Foo<T, N> {
    fn spec_len(&self) -> usize {
        N
    }
}
```
…-no-error

fix: Do not emit a "type annotations needed" error on `include_bytes!()` where the array length cannot be inferred
…tOne

The old code looks like a copy-paste mistake.
Address the FIXMEs in crates/hir-ty/src/lower.rs where
next_ty_var, next_const_var, and next_region_var silently
returned error types without emitting diagnostics when
inference variables are not allowed (e.g., `_` in type aliases,
consts, statics, struct fields).

- Add InferVarsNotAllowed variant to TyLoweringDiagnostic enum
- Call push_diagnostic in the three next_*_var functions for any
  non-dummy span
- Convert TyLoweringDiagnostic from struct+kind to flat enum with
  per-variant source (TypeRefId for PathDiagnostic, Span for
  InferVarsNotAllowed)
- Add span_syntax helper resolving all Span variants to AST nodes
- Extract expr_syntax/pat_syntax/type_syntax/span_syntax closures
  from inference_diagnostic into associated functions on AnyDiagnostic
- Add InferVarsNotAllowed HIR diagnostic struct with
  InFile<SyntaxNodePtr> node
- Add ide-diagnostics handler with E0121 error code and tests
…ct-json

fix: RunnableKind::Test should map to project_json::RunnableKind::TestOne
`pat()` does not parse or patterns.
feat(diagnostics): emit error for infer vars in non-inference contexts
internal: Align MIR ProjectionElem more with rustc's version and simplify it
This is needed so that IDE features can find their anon consts and work with them. We lower them in `field_types()`, which seemed appropriate (we need to know the type for the const, and creating another query doesn't seem worth it).

We'll also need them for const eval, but currently default expressions are not handled in MIR.
…s-infer

feat: Lower field defaults to `rustc_type_ir::Const`s
…gen-args

fix: no generate unused generic params in trait sign
I'm seeing several occurrences of errors of the form:

```
Unable to get `FileSourceRootInput` with `vfs::FileId` (FileId(22452)); this is a bug
```

I suspect it occurs when the user has many projects open, but I can't
reliably reproduce yet. In the meantime, include the actual file name
to aid debugging.

AI disclosure: Partially written with Codex and GPT 5.5.
…essage

internal: Improve panic message when FileSourceRootInput is missing
Veykril and others added 17 commits June 6, 2026 12:17
Implement `rust-analyzer/evaluatePredicate` lsp extension
Distribute windows builts with mimalloc
…od()\`

fixes rust-lang/rust-analyzer#20162

\`expr_require_exclusive_access\` had no \`IndexExpr\` case, so
\`container[i].mut_method()\` fell through to \`Some(false)\`. \`WRITE\` is only
set on direct assignments, so method calls through an index were not detected
as requiring exclusive access, and the container was extracted as \`&container\`
instead of \`&mut container\`.
…index-mut-method

fix: \`extract_function\` misses \`&mut\` for \`container[i].mut_method()\`
This updates the rust-version file to 43a4909.
This updates the rust-version file to 029c9e1.
@rustbot

rustbot commented Jun 8, 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 Jun 8, 2026
@lnicola

lnicola commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=1

@rust-bors

rust-bors Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 475a2df has been approved by lnicola

It is now in the queue for this repository.

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

@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 8, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 8, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157599 (`rust-analyzer` subtree update)
 - #157298 (Use alternate means of detecting enums in `is_udt`)
 - #155338 (Staticlib hide internal symbols)
 - #157402 (Implement feature `integer_casts`)
 - #157452 (Fix WASI links)
 - #157535 (Rename `errors.rs` file to `diagnostics.rs` (2/N))
 - #157585 (Rename `errors.rs` file to `diagnostics.rs` (3/N))
 - #157588 (Use `mul nuw nsw` in `intrinsics::copy`)
 - #157592 (Suggest comma multiple)
@rust-bors rust-bors Bot merged commit 0a79d4d into rust-lang:main Jun 8, 2026
12 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 8, 2026
@lnicola lnicola deleted the sync-from-ra branch June 8, 2026 13:25
rust-timer added a commit that referenced this pull request Jun 8, 2026
Rollup merge of #157599 - lnicola:sync-from-ra, r=lnicola

`rust-analyzer` subtree update

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

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.

10 participants