Skip to content

rust-analyzer subtree update - #162404

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

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

Conversation

@lnicola

@lnicola lnicola commented Sep 7, 2026

Copy link
Copy Markdown
Member

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

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

r? @ghost

ChayimFriedman2 and others added 30 commits June 29, 2026 03:34
Installing cargo tools (`cargo install`) without locked dependencies exposes users to supply-chain attacks to all the dependencies of the tool (https://blog.rust-lang.org/2026/08/20/supply-chain-attack-on-arrayref/). Using `cargo install --locked` reduces this risk to a compromise of the tool itself, while using the locked and hashed version of the dependencies.

I went through all `rg "cargo install"` hits in the repository and added `--locked` to all but explanatory examples (such as cargo's docs on `cargo install` itself). I validated that those tools publish functioning `Cargo.lock`s with https://gist.github.com/konstin/bcb1169c1c1120c259dca64e777a64d0.
For two reasons:

 - This simplifies my work to fix rust-lang/rust-analyzer#23088; to fix that issue, macros must have to be able to return doc comments (and not just desugared doc comments), and code in `syntax-bridge` doesn't expect macros to return trivia. Making doc comments non-trivia solves that.
 - It should simplify the work to attach trivia to tokens; doc comments have no obvious place to attach (for example, when between two attributes we must attach them to either the preceding `]` or the following `#`, both will complicate code handling them).

Furthermore, arguably doc comments are really not a trivia: it's an error to put them in an unexpected place, and reason 2 above reveals that they're more like a kind of an attribute than a comment.

This touches a lot of places (especially assists etc.) subtly; I fixed what I found and the tests helped reveal more, but it's certainly possible some places are still not handling them correctly now.
`body` is no longer a neighbouring module, but rather a child of `expr_store`
The `continue` was aimed at the incorrect loop. I thought this will cause an infinite loop but it doesn't seem to, still it's incorrect.
fix: Fix handling of `#[unsafe()]` attrs without inner meta
A lot of callsites handled these variants similarly, so this ended up
simplifying things.
Example
---
```diff
-fn method(&mut self,params: <ty!()as SomeTrait>::Output) {}
+fn method(&mut self, params: <ty!()as SomeTrait>::Output) {}
```
merge `hir_def::hir::Expr::Unsafe` into `Expr::Block`
minor: add space after comma in prettify macro expansion
…ource

Address FIXME in base-db and update docs
…locked

Install cargo tools with locked dependencies
Example
---
```rust
fn main() {
    $01f64;
}
```

**Before this PR**

```rust
value of literal: ` 1 (0x1|0b1) `
```

**After this PR**

```rust
value of literal: ` 1 (bits: 0x3FF0000000000000) `
```
fix: hover `1f64` use float instead of integer
This updates the rust-version file to 59dabe5.
…lf-segment

fix: accept Self as non-leading path segment in attribute paths
…etails

render const value in completions label details
ada4a and others added 18 commits September 3, 2026 12:47
I spent more time than I'd like to admit wrapping the condition in an
_actual_ block... let's not allow this to happen again
Instead of matching two variants and basically immediately branching on
which one we've matched, match the two variants separately.
The scan of the target libdir for rustc_macros & co. used
DirEntry::file_type(), which does not follow symlinks. Toolchains
assembled out of symlinks (e.g. by nix / oxalica's rust-overlay) link
every dylib into the sysroot, so all proc-macro dylibs were skipped. As a
result `rustc_queries!` never expanded for rustc_private projects and the
macro-generated TyCtxt query getters (`tcx.mir_keys(())` etc.) did not
resolve at all.

Use fs::metadata, which traverses symlinks, instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s-tuple

fix: allow inner attributes on blocks in tuple expressions
…acro-dylibs

Follow symlinks when scanning the sysroot for proc-macro dylibs
…nify

fix: Avoid type unification errors in term search
fix: Fix parsing of `self::` in fn param list
This updates the rust-version file to 32d94cc.
@rustbot

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

lnicola commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=1

@rust-bors

rust-bors Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 13c9cca 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 Sep 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 7, 2026
`rust-analyzer` subtree update

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

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

r? @ghost
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 7, 2026
`rust-analyzer` subtree update

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

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

r? @ghost
rust-bors Bot pushed a commit that referenced this pull request Sep 7, 2026
Rollup of 14 pull requests

Successful merges:

 - #162404 (`rust-analyzer` subtree update)
 - #161624 (diagnostics: Point closure trait errors at captured values)
 - #161697 (make `Complex` ABI-compatible on sparc64 and powerpc64)
 - #162182 (delay unexpected successful goal during ambiguity reporting)
 - #162328 (Allow overriding filecheck even if LLVM is built or downloaded)
 - #162367 (Use `reason` for tracked item diagnostics from `cfg_select!`)
 - #162381 (fix bare urls split text)
 - #162388 (std: fix set_permissions_nofollow on espidf and horizon)
 - #162319 (docs(core): correct ARMv8-M Baseline atomic CAS support)
 - #162341 (add regression test for packus_epi16 issue)
 - #162383 (Add a hint for using `nolimit` to the limiting error message)
 - #162384 (remove EnumSizeOpt)
 - #162390 (remove outdated comment in `UnsafeCell::raw_get` source)
 - #162397 (docs: Ask for ABI documentation in the platform support template)
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.