Skip to content

rust-analyzer subtree update#155556

Merged
rust-bors[bot] merged 160 commits intorust-lang:mainfrom
lnicola:sync-from-ra
Apr 20, 2026
Merged

rust-analyzer subtree update#155556
rust-bors[bot] merged 160 commits intorust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola
Copy link
Copy Markdown
Member

@lnicola lnicola commented Apr 20, 2026

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

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

r? @ghost

Young-Flash and others added 30 commits April 11, 2026 13:23
Co-authored-by: Amit Singhmar <abhay.singhmar2@gmail.com>
Example
---
```rust
fn foo() {
    let mut arr = [1i32];
    $0arr[0] = 3;$0
    let _ = arr;
}
```

**Before this PR**

```rust
fn foo() {
    let mut arr = [1i32];
    fun_name(&mut arr);
    let _ = arr;
}

fn $0fun_name(arr: &mut [i32; 1]) {
    *arr[0] = 3;
}
```

**After this PR**

```rust
fn foo() {
    let mut arr = [1i32];
    fun_name(&mut arr);
    let _ = arr;
}

fn $0fun_name(arr: &mut [i32; 1]) {
    arr[0] = 3;
}
```
…ent-index

fix: no deref index-expr for extract_function
I chose the order of mut restrictions to be `unsafe mut(...)` for unsafe fields, but it's undecided yet.
feat: Support `impl` and `mut` restrictions
GitHub actions are currently failing with:

    error: unresolved link to `cfg_attr`
       --> crates/ide-completion/src/context.rs:414:61
        |
    414 |     /// Set if we are inside the predicate of a #[cfg] or #[cfg_attr].
        |                                                             ^^^^^^^^ no item named `cfg_attr` in scope
        |
        = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
        = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`

     Documenting ide v0.0.0 (/home/runner/work/rust-analyzer/rust-analyzer/crates/ide)
    error: could not document `ide-completion`

Use backticks to fix this.

AI disclosure: written with Claude Opus because it was marginally
faster.
Previously, we didn't recurse in Evaluator::create_memory_map() or
Evaluator::patch_addresses() when handling references with a known
size.

This caused problems for hover rendering on const values, which would
build a memory map for evaluated allocations and then pretty-printed
values by following references through that map.

As a result, references in the map still pointed to the original addresses,
meaning that the value pretty-printer would see the type parameters
before substitution. This could cause stack overflows on well-formed
Rust code using recursive const functions.

Add a regression test for hovering on a recursive const fn that
previously caused stack overflow.

Fixes rust-lang/rust-analyzer#21503

AI disclosure: I used Codex with GPT 5.4 to investigate the issue and
write the initial version of this commit.
We want to complain on PRs that generate rustdoc warnings, but only
deploy the generate HTML on the master branch.

Also fix the existing rustdoc warning.

AI disclosure: Some Claude Opus usage.
internal: Ensure rustdoc GitHub action runs on PRs
Fixes rust-lang/rust-analyzer#21891.

Previously, the completion engine would aggressively bail out if the parent enum was marked . This pushes the visibility check down to the individual variants so they can be properly completed when accessed via a public type alias.
…ocal_inherent_impl_on_render

Demoting completion relevance when an inherent impl already exists
fix: MIR evaluation of sized &T with recursive const fn
fix: complete variants of hidden enums through public aliases
This is a quick fix, please review if there is a regression

Example
---
```rust
fn foo(data: &i32) {}
fn main() {
    let indent = 2i32;
    foo(in$0)
}
```

**Before this PR**

```rust
fn foo(data: &i32) {}
fn main() {
    let indent = 2i32;
    foo(in&dent)
}
```

```rust
source_range: 65..67,
delete: 65..67,
ref_match: "&@67",
..
```

**After this PR**

```rust
fn foo(data: &i32) {}
fn main() {
    let indent = 2i32;
    foo(&indent)
}
```

```rust
source_range: 65..67,
delete: 65..67,
ref_match: "&@65",
..
```
…uickfix

fix: Fix ref_match position when keyword prefix
…tability-api

feat: add is_mutable_raw_ptr and as_raw_ptr to hir::Type
Bumps [rand](https://github.com/rust-random/rand) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.9.3/CHANGELOG.md)
- [Commits](rust-random/rand@rand_core-0.9.2...0.9.3)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.9.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 20, 2026

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 Apr 20, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 20, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@lnicola
Copy link
Copy Markdown
Member Author

lnicola commented Apr 20, 2026

@bors r+ p=1

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 20, 2026

📌 Commit 5d84f89 has been approved by lnicola

It is now in the queue for this repository.

@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 Apr 20, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 20, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #155556 (`rust-analyzer` subtree update)
 - #152162 (Suggest returning a reference for unsized place from a closure)
 - #155389 (Simplify macros for target-modifier and mitigation flags)
 - #155553 (miri subtree update)
 - #153546 (tests/ui/extern: add annotations for reference rules)
 - #155475 (Make reparsed guard metavars collect tokens)
 - #155560 (Remove `AttributeLintKind` variants - part 4)
@rust-bors rust-bors Bot merged commit 64d875f into rust-lang:main Apr 20, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 20, 2026
rust-timer added a commit that referenced this pull request Apr 20, 2026
Rollup merge of #155556 - lnicola:sync-from-ra, r=lnicola

`rust-analyzer` subtree update

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

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

r? @ghost
@lnicola lnicola deleted the sync-from-ra branch April 21, 2026 05:01
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Apr 24, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#155556 (`rust-analyzer` subtree update)
 - rust-lang/rust#152162 (Suggest returning a reference for unsized place from a closure)
 - rust-lang/rust#155389 (Simplify macros for target-modifier and mitigation flags)
 - rust-lang/rust#155553 (miri subtree update)
 - rust-lang/rust#153546 (tests/ui/extern: add annotations for reference rules)
 - rust-lang/rust#155475 (Make reparsed guard metavars collect tokens)
 - rust-lang/rust#155560 (Remove `AttributeLintKind` variants - part 4)
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.