rust-analyzer subtree update - #162404
Open
lnicola wants to merge 57 commits into
Open
Conversation
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.
internal: rename some stuff in mir
`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
update typos-cli
…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.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@59dabe5 Filtered ref: rust-lang/rust-analyzer@4821b91 Upstream diff: rust-lang/rust@f7d782a...59dabe5 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
…lf-segment fix: accept Self as non-leading path segment in attribute paths
…etails render const value in completions label details
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.
internal: various small clean-ups
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
Fix `NamedTempFile` constructors
…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.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@32d94cc Filtered ref: rust-lang/rust-analyzer@a4fa191 Upstream diff: rust-lang/rust@59dabe5...32d94cc This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Collaborator
|
cc @rust-lang/rust-analyzer |
Member
Author
|
@bors r+ p=1 |
Contributor
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@cf0d2d9.Created using https://github.com/rust-lang/josh-sync.
r? @ghost